{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "kernelspec": {
      "display_name": "Python 3",
      "language": "python",
      "name": "python3"
    },
    "language_info": {
      "codemirror_mode": {
        "name": "ipython",
        "version": 3
      },
      "file_extension": ".py",
      "mimetype": "text/x-python",
      "name": "python",
      "nbconvert_exporter": "python",
      "pygments_lexer": "ipython3",
      "version": "3.6.5"
    },
    "colab": {
      "name": "2-7_SSD_training.ipynb",
      "provenance": [],
      "collapsed_sections": []
    }
  },
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "NRDrOClOJvlA"
      },
      "source": [
        "# 2.7 学習と検証の実施\n",
        "\n",
        "- 本ファイルでは、SSDの学習と検証の実施を行います。手元のマシンで動作を確認後、AWSのGPUマシンで計算します。\n",
        "- p2.xlargeで約6時間かかります。\n"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "dQkSZ3f7JvlH"
      },
      "source": [
        "# 学習目標\n",
        "\n",
        "1.\tSSDの学習を実装できるようになる"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "E-pUmMgPJvlI"
      },
      "source": [
        "# 事前準備\n",
        "\n",
        "- AWS EC2 のGPUインスタンスを使用します\n",
        "- フォルダ「utils」のssd_model.pyをします"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "5wFXuAjsJvlI"
      },
      "source": [
        "# パッケージのimport\n",
        "import os.path as osp\n",
        "import random\n",
        "import time\n",
        "\n",
        "import cv2\n",
        "import numpy as np\n",
        "import pandas as pd\n",
        "import torch\n",
        "import torch.nn as nn\n",
        "import torch.nn.init as init\n",
        "import torch.optim as optim\n",
        "import torch.utils.data as data"
      ],
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "MKIiLcdZJvlJ"
      },
      "source": [
        "# 乱数のシードを設定\n",
        "torch.manual_seed(1234)\n",
        "np.random.seed(1234)\n",
        "random.seed(1234)"
      ],
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "fNcYx2L0JvlK",
        "outputId": "c2e8ec71-fb0c-4dd1-f05c-a1e6bf500a8a"
      },
      "source": [
        "device = torch.device(\"cuda:0\" if torch.cuda.is_available() else \"cpu\")\n",
        "print(\"使用デバイス：\", device)"
      ],
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "使用デバイス： cuda:0\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "Q2hwPVpFJvlK"
      },
      "source": [
        "# DatasetとDataLoaderを作成する"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "9scicyiOJvlL"
      },
      "source": [
        "from utils.ssd_model import make_datapath_list, VOCDataset, DataTransform, Anno_xml2list, od_collate_fn\n",
        "\n",
        "\n",
        "# ファイルパスのリストを取得\n",
        "rootpath = \"./data/VOCdevkit/VOC2012/\"\n",
        "train_img_list, train_anno_list, val_img_list, val_anno_list = make_datapath_list(\n",
        "    rootpath)\n",
        "\n",
        "# Datasetを作成\n",
        "voc_classes = ['aeroplane', 'bicycle', 'bird', 'boat',\n",
        "               'bottle', 'bus', 'car', 'cat', 'chair',\n",
        "               'cow', 'diningtable', 'dog', 'horse',\n",
        "               'motorbike', 'person', 'pottedplant',\n",
        "               'sheep', 'sofa', 'train', 'tvmonitor']\n",
        "color_mean = (104, 117, 123)  # (BGR)の色の平均値\n",
        "input_size = 300  # 画像のinputサイズを300×300にする\n",
        "\n",
        "train_dataset = VOCDataset(train_img_list, train_anno_list, phase=\"train\", transform=DataTransform(\n",
        "    input_size, color_mean), transform_anno=Anno_xml2list(voc_classes))\n",
        "\n",
        "val_dataset = VOCDataset(val_img_list, val_anno_list, phase=\"val\", transform=DataTransform(\n",
        "    input_size, color_mean), transform_anno=Anno_xml2list(voc_classes))\n",
        "\n",
        "\n",
        "# DataLoaderを作成する\n",
        "batch_size = 32\n",
        "\n",
        "train_dataloader = data.DataLoader(\n",
        "    train_dataset, batch_size=batch_size, shuffle=True, collate_fn=od_collate_fn)\n",
        "\n",
        "val_dataloader = data.DataLoader(\n",
        "    val_dataset, batch_size=batch_size, shuffle=False, collate_fn=od_collate_fn)\n",
        "\n",
        "# 辞書オブジェクトにまとめる\n",
        "dataloaders_dict = {\"train\": train_dataloader, \"val\": val_dataloader}\n"
      ],
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "Vbyl0KAwJvlL"
      },
      "source": [
        "# ネットワークモデルの作成する"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "4dFZ6oVjJvlM",
        "outputId": "6e7542ee-79e0-412d-afcd-342f6927eb57"
      },
      "source": [
        "from utils.ssd_model import SSD\n",
        "\n",
        "# SSD300の設定\n",
        "ssd_cfg = {\n",
        "    'num_classes': 21,  # 背景クラスを含めた合計クラス数\n",
        "    'input_size': 300,  # 画像の入力サイズ\n",
        "    'bbox_aspect_num': [4, 6, 6, 6, 4, 4],  # 出力するDBoxのアスペクト比の種類\n",
        "    'feature_maps': [38, 19, 10, 5, 3, 1],  # 各sourceの画像サイズ\n",
        "    'steps': [8, 16, 32, 64, 100, 300],  # DBOXの大きさを決める\n",
        "    'min_sizes': [30, 60, 111, 162, 213, 264],  # DBOXの大きさを決める\n",
        "    'max_sizes': [60, 111, 162, 213, 264, 315],  # DBOXの大きさを決める\n",
        "    'aspect_ratios': [[2], [2, 3], [2, 3], [2, 3], [2], [2]],\n",
        "}\n",
        "\n",
        "# SSDネットワークモデル\n",
        "net = SSD(phase=\"train\", cfg=ssd_cfg)\n",
        "\n",
        "# SSDの初期の重みを設定\n",
        "# ssdのvgg部分に重みをロードする\n",
        "vgg_weights = torch.load('./weights/vgg16_reducedfc.pth')\n",
        "net.vgg.load_state_dict(vgg_weights)\n",
        "\n",
        "# ssdのその他のネットワークの重みはHeの初期値で初期化\n",
        "\n",
        "\n",
        "def weights_init(m):\n",
        "    if isinstance(m, nn.Conv2d):\n",
        "        init.kaiming_normal_(m.weight.data)\n",
        "        if m.bias is not None:  # バイアス項がある場合\n",
        "            nn.init.constant_(m.bias, 0.0)\n",
        "\n",
        "\n",
        "# Heの初期値を適用\n",
        "net.extras.apply(weights_init)\n",
        "net.loc.apply(weights_init)\n",
        "net.conf.apply(weights_init)\n",
        "\n",
        "# GPUが使えるかを確認\n",
        "device = torch.device(\"cuda:0\" if torch.cuda.is_available() else \"cpu\")\n",
        "print(\"使用デバイス：\", device)\n",
        "\n",
        "print('ネットワーク設定完了：学習済みの重みをロードしました')\n"
      ],
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "使用デバイス： cuda:0\n",
            "ネットワーク設定完了：学習済みの重みをロードしました\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "c5tGwXegJvlM"
      },
      "source": [
        "# 損失関数と最適化手法を定義する"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "IkZq2BPeJvlM"
      },
      "source": [
        "from utils.ssd_model import MultiBoxLoss\n",
        "\n",
        "# 損失関数の設定\n",
        "criterion = MultiBoxLoss(jaccard_thresh=0.5, neg_pos=3, device=device)\n",
        "\n",
        "# 最適化手法の設定\n",
        "optimizer = optim.SGD(net.parameters(), lr=1e-3,\n",
        "                      momentum=0.9, weight_decay=5e-4)\n"
      ],
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "PXpicFdQJvlN"
      },
      "source": [
        "# 学習・検証を実施する"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "h5BNcGMKJvlN"
      },
      "source": [
        "# モデルを学習させる関数を作成\n",
        "\n",
        "\n",
        "def train_model(net, dataloaders_dict, criterion, optimizer, num_epochs):\n",
        "\n",
        "    # GPUが使えるかを確認\n",
        "    device = torch.device(\"cuda:0\" if torch.cuda.is_available() else \"cpu\")\n",
        "    print(\"使用デバイス：\", device)\n",
        "\n",
        "    # ネットワークをGPUへ\n",
        "    net.to(device)\n",
        "\n",
        "    # ネットワークがある程度固定であれば、高速化させる\n",
        "    torch.backends.cudnn.benchmark = True\n",
        "\n",
        "    # イテレーションカウンタをセット\n",
        "    iteration = 1\n",
        "    epoch_train_loss = 0.0  # epochの損失和\n",
        "    epoch_val_loss = 0.0  # epochの損失和\n",
        "    logs = []\n",
        "\n",
        "    # epochのループ\n",
        "    for epoch in range(num_epochs+1):\n",
        "\n",
        "        # 開始時刻を保存\n",
        "        t_epoch_start = time.time()\n",
        "        t_iter_start = time.time()\n",
        "\n",
        "        print('-------------')\n",
        "        print('Epoch {}/{}'.format(epoch+1, num_epochs))\n",
        "        print('-------------')\n",
        "\n",
        "        # epochごとの訓練と検証のループ\n",
        "        for phase in ['train', 'val']:\n",
        "            if phase == 'train':\n",
        "                net.train()  # モデルを訓練モードに\n",
        "                print('（train）')\n",
        "            else:\n",
        "                if((epoch+1) % 10 == 0):\n",
        "                    net.eval()   # モデルを検証モードに\n",
        "                    print('-------------')\n",
        "                    print('（val）')\n",
        "                else:\n",
        "                    # 検証は10回に1回だけ行う\n",
        "                    continue\n",
        "\n",
        "            # データローダーからminibatchずつ取り出すループ\n",
        "            for images, targets in dataloaders_dict[phase]:\n",
        "\n",
        "                # GPUが使えるならGPUにデータを送る\n",
        "                images = images.to(device)\n",
        "                targets = [ann.to(device)\n",
        "                           for ann in targets]  # リストの各要素のテンソルをGPUへ\n",
        "\n",
        "                # optimizerを初期化\n",
        "                optimizer.zero_grad()\n",
        "\n",
        "                # 順伝搬（forward）計算\n",
        "                with torch.set_grad_enabled(phase == 'train'):\n",
        "                    # 順伝搬（forward）計算\n",
        "                    outputs = net(images)\n",
        "\n",
        "                    # 損失の計算\n",
        "                    loss_l, loss_c = criterion(outputs, targets)\n",
        "                    loss = loss_l + loss_c\n",
        "\n",
        "                    # 訓練時はバックプロパゲーション\n",
        "                    if phase == 'train':\n",
        "                        loss.backward()  # 勾配の計算\n",
        "\n",
        "                        # 勾配が大きくなりすぎると計算が不安定になるので、clipで最大でも勾配2.0に留める\n",
        "                        nn.utils.clip_grad_value_(\n",
        "                            net.parameters(), clip_value=2.0)\n",
        "\n",
        "                        optimizer.step()  # パラメータ更新\n",
        "\n",
        "                        if (iteration % 10 == 0):  # 10iterに1度、lossを表示\n",
        "                            t_iter_finish = time.time()\n",
        "                            duration = t_iter_finish - t_iter_start\n",
        "                            print('イテレーション {} || Loss: {:.4f} || 10iter: {:.4f} sec.'.format(\n",
        "                                iteration, loss.item(), duration))\n",
        "                            t_iter_start = time.time()\n",
        "\n",
        "                        epoch_train_loss += loss.item()\n",
        "                        iteration += 1\n",
        "\n",
        "                    # 検証時\n",
        "                    else:\n",
        "                        epoch_val_loss += loss.item()\n",
        "\n",
        "        # epochのphaseごとのloss （Issue158での誤植修正）\n",
        "        t_epoch_finish = time.time()\n",
        "        print('-------------')\n",
        "        print('epoch {} || Epoch_TRAIN_Loss:{:.4f} ||Epoch_VAL_Loss:{:.4f}'.format(\n",
        "            epoch+1, epoch_train_loss, epoch_val_loss))\n",
        "        print('timer:  {:.4f} sec.'.format(t_epoch_finish - t_epoch_start))\n",
        "        t_epoch_start = time.time()\n",
        "\n",
        "        # ログを保存\n",
        "        log_epoch = {'epoch': epoch+1,\n",
        "                     'train_loss': epoch_train_loss, 'val_loss': epoch_val_loss}\n",
        "        logs.append(log_epoch)\n",
        "        df = pd.DataFrame(logs)\n",
        "        df.to_csv(\"log_output.csv\")\n",
        "\n",
        "        epoch_train_loss = 0.0  # epochの損失和\n",
        "        epoch_val_loss = 0.0  # epochの損失和\n",
        "\n",
        "        # ネットワークを保存する\n",
        "        if ((epoch+1) % 10 == 0):\n",
        "            torch.save(net.state_dict(), 'weights/ssd300_' +\n",
        "                       str(epoch+1) + '.pth')\n"
      ],
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "BuOV3vkiJvlO",
        "outputId": "0a817057-95b0-4c31-f25a-9649d1d21a2f"
      },
      "source": [
        "# 学習・検証を実行する\n",
        "num_epochs= 50  \n",
        "train_model(net, dataloaders_dict, criterion, optimizer, num_epochs=num_epochs)"
      ],
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "使用デバイス： cuda:0\n",
            "-------------\n",
            "Epoch 1/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 10 || Loss: 16.7849 || 10iter: 52.2679 sec.\n",
            "イテレーション 20 || Loss: 12.0788 || 10iter: 25.0179 sec.\n",
            "イテレーション 30 || Loss: 10.9953 || 10iter: 25.4926 sec.\n",
            "イテレーション 40 || Loss: 9.8858 || 10iter: 25.0565 sec.\n",
            "イテレーション 50 || Loss: 8.6146 || 10iter: 24.8988 sec.\n",
            "イテレーション 60 || Loss: 8.1224 || 10iter: 24.7498 sec.\n",
            "イテレーション 70 || Loss: 8.5834 || 10iter: 25.5584 sec.\n",
            "イテレーション 80 || Loss: 8.2935 || 10iter: 24.9817 sec.\n",
            "イテレーション 90 || Loss: 8.2462 || 10iter: 25.1121 sec.\n",
            "イテレーション 100 || Loss: 7.5155 || 10iter: 24.8603 sec.\n",
            "イテレーション 110 || Loss: 7.7157 || 10iter: 25.1244 sec.\n",
            "イテレーション 120 || Loss: 7.5915 || 10iter: 25.6062 sec.\n",
            "イテレーション 130 || Loss: 7.7106 || 10iter: 24.9809 sec.\n",
            "イテレーション 140 || Loss: 7.7460 || 10iter: 24.4395 sec.\n",
            "イテレーション 150 || Loss: 7.8148 || 10iter: 24.9344 sec.\n",
            "イテレーション 160 || Loss: 7.3453 || 10iter: 25.3215 sec.\n",
            "イテレーション 170 || Loss: 7.1660 || 10iter: 24.7397 sec.\n",
            "-------------\n",
            "epoch 1 || Epoch_TRAIN_Loss:1642.0417 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  516.8996 sec.\n",
            "-------------\n",
            "Epoch 2/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 180 || Loss: 7.4364 || 10iter: 1.3652 sec.\n",
            "イテレーション 190 || Loss: 6.7883 || 10iter: 25.5676 sec.\n",
            "イテレーション 200 || Loss: 7.3006 || 10iter: 25.5415 sec.\n",
            "イテレーション 210 || Loss: 7.2568 || 10iter: 24.7816 sec.\n",
            "イテレーション 220 || Loss: 6.4969 || 10iter: 24.7992 sec.\n",
            "イテレーション 230 || Loss: 6.9021 || 10iter: 24.9685 sec.\n",
            "イテレーション 240 || Loss: 7.3181 || 10iter: 25.1238 sec.\n",
            "イテレーション 250 || Loss: 6.8294 || 10iter: 25.0856 sec.\n",
            "イテレーション 260 || Loss: 6.7077 || 10iter: 25.3189 sec.\n",
            "イテレーション 270 || Loss: 7.1685 || 10iter: 25.2474 sec.\n",
            "イテレーション 280 || Loss: 7.1316 || 10iter: 25.1017 sec.\n",
            "イテレーション 290 || Loss: 6.9723 || 10iter: 24.8996 sec.\n",
            "イテレーション 300 || Loss: 6.8483 || 10iter: 25.0422 sec.\n",
            "イテレーション 310 || Loss: 6.9739 || 10iter: 24.8803 sec.\n",
            "イテレーション 320 || Loss: 6.6592 || 10iter: 24.8864 sec.\n",
            "イテレーション 330 || Loss: 6.4554 || 10iter: 25.0642 sec.\n",
            "イテレーション 340 || Loss: 6.5270 || 10iter: 24.9529 sec.\n",
            "イテレーション 350 || Loss: 6.5654 || 10iter: 24.8177 sec.\n",
            "-------------\n",
            "epoch 2 || Epoch_TRAIN_Loss:1255.0116 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  471.2222 sec.\n",
            "-------------\n",
            "Epoch 3/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 360 || Loss: 6.7739 || 10iter: 3.9373 sec.\n",
            "イテレーション 370 || Loss: 6.6814 || 10iter: 24.9740 sec.\n",
            "イテレーション 380 || Loss: 7.3918 || 10iter: 24.9005 sec.\n",
            "イテレーション 390 || Loss: 6.2988 || 10iter: 25.2823 sec.\n",
            "イテレーション 400 || Loss: 6.7563 || 10iter: 25.2193 sec.\n",
            "イテレーション 410 || Loss: 6.3910 || 10iter: 24.9909 sec.\n",
            "イテレーション 420 || Loss: 6.2038 || 10iter: 24.8532 sec.\n",
            "イテレーション 430 || Loss: 6.8070 || 10iter: 25.3236 sec.\n",
            "イテレーション 440 || Loss: 6.4289 || 10iter: 24.8976 sec.\n",
            "イテレーション 450 || Loss: 6.8230 || 10iter: 24.7451 sec.\n",
            "イテレーション 460 || Loss: 6.4831 || 10iter: 25.0593 sec.\n",
            "イテレーション 470 || Loss: 6.5782 || 10iter: 24.8398 sec.\n",
            "イテレーション 480 || Loss: 6.8685 || 10iter: 24.7452 sec.\n",
            "イテレーション 490 || Loss: 5.9933 || 10iter: 24.8938 sec.\n",
            "イテレーション 500 || Loss: 6.3228 || 10iter: 24.6807 sec.\n",
            "イテレーション 510 || Loss: 6.3407 || 10iter: 24.6102 sec.\n",
            "イテレーション 520 || Loss: 6.5821 || 10iter: 25.2405 sec.\n",
            "イテレーション 530 || Loss: 6.4223 || 10iter: 25.1836 sec.\n",
            "-------------\n",
            "epoch 3 || Epoch_TRAIN_Loss:1182.2687 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  469.9261 sec.\n",
            "-------------\n",
            "Epoch 4/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 540 || Loss: 6.3779 || 10iter: 6.6664 sec.\n",
            "イテレーション 550 || Loss: 5.9722 || 10iter: 25.6678 sec.\n",
            "イテレーション 560 || Loss: 6.7611 || 10iter: 24.9337 sec.\n",
            "イテレーション 570 || Loss: 6.2265 || 10iter: 25.4724 sec.\n",
            "イテレーション 580 || Loss: 5.9880 || 10iter: 24.5762 sec.\n",
            "イテレーション 590 || Loss: 6.1650 || 10iter: 24.9336 sec.\n",
            "イテレーション 600 || Loss: 6.5857 || 10iter: 24.8508 sec.\n",
            "イテレーション 610 || Loss: 6.5195 || 10iter: 24.9340 sec.\n",
            "イテレーション 620 || Loss: 6.1640 || 10iter: 25.1430 sec.\n",
            "イテレーション 630 || Loss: 5.8308 || 10iter: 25.0656 sec.\n",
            "イテレーション 640 || Loss: 6.1920 || 10iter: 24.6976 sec.\n",
            "イテレーション 650 || Loss: 6.2523 || 10iter: 24.8515 sec.\n",
            "イテレーション 660 || Loss: 6.1331 || 10iter: 24.8969 sec.\n",
            "イテレーション 670 || Loss: 6.0616 || 10iter: 25.3557 sec.\n",
            "イテレーション 680 || Loss: 6.3854 || 10iter: 25.2896 sec.\n",
            "イテレーション 690 || Loss: 7.0572 || 10iter: 24.9779 sec.\n",
            "イテレーション 700 || Loss: 6.1569 || 10iter: 25.1667 sec.\n",
            "イテレーション 710 || Loss: 6.7970 || 10iter: 24.6129 sec.\n",
            "-------------\n",
            "epoch 4 || Epoch_TRAIN_Loss:1116.5151 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  470.9286 sec.\n",
            "-------------\n",
            "Epoch 5/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 720 || Loss: 6.2981 || 10iter: 9.2661 sec.\n",
            "イテレーション 730 || Loss: 6.3292 || 10iter: 25.0785 sec.\n",
            "イテレーション 740 || Loss: 5.8920 || 10iter: 25.4679 sec.\n",
            "イテレーション 750 || Loss: 6.4314 || 10iter: 25.8000 sec.\n",
            "イテレーション 760 || Loss: 6.0546 || 10iter: 24.8190 sec.\n",
            "イテレーション 770 || Loss: 5.7194 || 10iter: 24.7992 sec.\n",
            "イテレーション 780 || Loss: 5.9844 || 10iter: 24.6972 sec.\n",
            "イテレーション 790 || Loss: 6.2750 || 10iter: 24.6386 sec.\n",
            "イテレーション 800 || Loss: 6.0233 || 10iter: 24.7448 sec.\n",
            "イテレーション 810 || Loss: 6.0953 || 10iter: 25.1480 sec.\n",
            "イテレーション 820 || Loss: 5.9208 || 10iter: 24.7581 sec.\n",
            "イテレーション 830 || Loss: 6.1946 || 10iter: 24.8119 sec.\n",
            "イテレーション 840 || Loss: 6.3381 || 10iter: 24.8802 sec.\n",
            "イテレーション 850 || Loss: 5.8917 || 10iter: 24.8207 sec.\n",
            "イテレーション 860 || Loss: 5.9156 || 10iter: 24.8315 sec.\n",
            "イテレーション 870 || Loss: 5.8704 || 10iter: 25.6226 sec.\n",
            "イテレーション 880 || Loss: 5.8195 || 10iter: 25.0001 sec.\n",
            "イテレーション 890 || Loss: 6.4514 || 10iter: 25.1516 sec.\n",
            "-------------\n",
            "epoch 5 || Epoch_TRAIN_Loss:1070.3184 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  470.4096 sec.\n",
            "-------------\n",
            "Epoch 6/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 900 || Loss: 6.1101 || 10iter: 11.8135 sec.\n",
            "イテレーション 910 || Loss: 6.0012 || 10iter: 24.7234 sec.\n",
            "イテレーション 920 || Loss: 5.9212 || 10iter: 24.8414 sec.\n",
            "イテレーション 930 || Loss: 6.0434 || 10iter: 25.3870 sec.\n",
            "イテレーション 940 || Loss: 5.6648 || 10iter: 24.8766 sec.\n",
            "イテレーション 950 || Loss: 5.5553 || 10iter: 24.8513 sec.\n",
            "イテレーション 960 || Loss: 6.0390 || 10iter: 24.8389 sec.\n",
            "イテレーション 970 || Loss: 5.9332 || 10iter: 24.7614 sec.\n",
            "イテレーション 980 || Loss: 5.5728 || 10iter: 24.8534 sec.\n",
            "イテレーション 990 || Loss: 5.5435 || 10iter: 24.7352 sec.\n",
            "イテレーション 1000 || Loss: 5.8543 || 10iter: 24.7537 sec.\n",
            "イテレーション 1010 || Loss: 5.9792 || 10iter: 25.0951 sec.\n",
            "イテレーション 1020 || Loss: 5.1770 || 10iter: 25.3000 sec.\n",
            "イテレーション 1030 || Loss: 5.5642 || 10iter: 25.1264 sec.\n",
            "イテレーション 1040 || Loss: 5.7967 || 10iter: 24.6222 sec.\n",
            "イテレーション 1050 || Loss: 5.9125 || 10iter: 24.8003 sec.\n",
            "イテレーション 1060 || Loss: 6.1848 || 10iter: 25.2969 sec.\n",
            "イテレーション 1070 || Loss: 5.8078 || 10iter: 24.8415 sec.\n",
            "-------------\n",
            "epoch 6 || Epoch_TRAIN_Loss:1029.6534 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  469.1616 sec.\n",
            "-------------\n",
            "Epoch 7/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 1080 || Loss: 5.9069 || 10iter: 14.5077 sec.\n",
            "イテレーション 1090 || Loss: 5.6206 || 10iter: 25.1344 sec.\n",
            "イテレーション 1100 || Loss: 5.3651 || 10iter: 25.1560 sec.\n",
            "イテレーション 1110 || Loss: 5.6770 || 10iter: 25.2510 sec.\n",
            "イテレーション 1120 || Loss: 5.3948 || 10iter: 24.9433 sec.\n",
            "イテレーション 1130 || Loss: 5.2744 || 10iter: 24.9672 sec.\n",
            "イテレーション 1140 || Loss: 5.4515 || 10iter: 24.6857 sec.\n",
            "イテレーション 1150 || Loss: 5.4634 || 10iter: 25.1704 sec.\n",
            "イテレーション 1160 || Loss: 5.3092 || 10iter: 25.3168 sec.\n",
            "イテレーション 1170 || Loss: 5.6530 || 10iter: 24.8203 sec.\n",
            "イテレーション 1180 || Loss: 5.7923 || 10iter: 25.3462 sec.\n",
            "イテレーション 1190 || Loss: 5.6847 || 10iter: 25.2264 sec.\n",
            "イテレーション 1200 || Loss: 5.5571 || 10iter: 24.7963 sec.\n",
            "イテレーション 1210 || Loss: 5.4853 || 10iter: 25.1933 sec.\n",
            "イテレーション 1220 || Loss: 5.6071 || 10iter: 25.7681 sec.\n",
            "イテレーション 1230 || Loss: 5.3379 || 10iter: 25.0275 sec.\n",
            "イテレーション 1240 || Loss: 5.0246 || 10iter: 24.9560 sec.\n",
            "イテレーション 1250 || Loss: 5.3670 || 10iter: 25.3474 sec.\n",
            "-------------\n",
            "epoch 7 || Epoch_TRAIN_Loss:991.2105 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  473.2723 sec.\n",
            "-------------\n",
            "Epoch 8/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 1260 || Loss: 5.5022 || 10iter: 17.0149 sec.\n",
            "イテレーション 1270 || Loss: 5.3504 || 10iter: 24.6654 sec.\n",
            "イテレーション 1280 || Loss: 5.5563 || 10iter: 25.2273 sec.\n",
            "イテレーション 1290 || Loss: 5.2734 || 10iter: 24.8242 sec.\n",
            "イテレーション 1300 || Loss: 5.0938 || 10iter: 25.0823 sec.\n",
            "イテレーション 1310 || Loss: 5.2125 || 10iter: 24.7428 sec.\n",
            "イテレーション 1320 || Loss: 5.9822 || 10iter: 25.1683 sec.\n",
            "イテレーション 1330 || Loss: 5.4644 || 10iter: 25.1552 sec.\n",
            "イテレーション 1340 || Loss: 5.4716 || 10iter: 25.2690 sec.\n",
            "イテレーション 1350 || Loss: 5.3039 || 10iter: 24.8592 sec.\n",
            "イテレーション 1360 || Loss: 5.3109 || 10iter: 24.9460 sec.\n",
            "イテレーション 1370 || Loss: 5.3014 || 10iter: 24.7659 sec.\n",
            "イテレーション 1380 || Loss: 5.8750 || 10iter: 25.0677 sec.\n",
            "イテレーション 1390 || Loss: 5.4123 || 10iter: 25.3185 sec.\n",
            "イテレーション 1400 || Loss: 5.6417 || 10iter: 24.9942 sec.\n",
            "イテレーション 1410 || Loss: 5.5405 || 10iter: 25.0465 sec.\n",
            "イテレーション 1420 || Loss: 5.0679 || 10iter: 25.1958 sec.\n",
            "イテレーション 1430 || Loss: 4.8836 || 10iter: 25.0064 sec.\n",
            "-------------\n",
            "epoch 8 || Epoch_TRAIN_Loss:962.3695 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  470.7159 sec.\n",
            "-------------\n",
            "Epoch 9/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 1440 || Loss: 5.5373 || 10iter: 19.6387 sec.\n",
            "イテレーション 1450 || Loss: 5.0377 || 10iter: 24.9010 sec.\n",
            "イテレーション 1460 || Loss: 5.2853 || 10iter: 24.8891 sec.\n",
            "イテレーション 1470 || Loss: 5.3909 || 10iter: 24.6718 sec.\n",
            "イテレーション 1480 || Loss: 5.3611 || 10iter: 25.0222 sec.\n",
            "イテレーション 1490 || Loss: 4.8390 || 10iter: 25.0545 sec.\n",
            "イテレーション 1500 || Loss: 5.1409 || 10iter: 24.8796 sec.\n",
            "イテレーション 1510 || Loss: 4.6153 || 10iter: 24.9355 sec.\n",
            "イテレーション 1520 || Loss: 5.2552 || 10iter: 24.4994 sec.\n",
            "イテレーション 1530 || Loss: 4.7739 || 10iter: 24.9455 sec.\n",
            "イテレーション 1540 || Loss: 5.6453 || 10iter: 25.1866 sec.\n",
            "イテレーション 1550 || Loss: 4.9973 || 10iter: 24.9271 sec.\n",
            "イテレーション 1560 || Loss: 5.4272 || 10iter: 25.3593 sec.\n",
            "イテレーション 1570 || Loss: 5.4490 || 10iter: 24.7129 sec.\n",
            "イテレーション 1580 || Loss: 5.4546 || 10iter: 24.8941 sec.\n",
            "イテレーション 1590 || Loss: 5.3138 || 10iter: 24.6491 sec.\n",
            "イテレーション 1600 || Loss: 5.3135 || 10iter: 24.9096 sec.\n",
            "イテレーション 1610 || Loss: 5.0022 || 10iter: 24.7972 sec.\n",
            "-------------\n",
            "epoch 9 || Epoch_TRAIN_Loss:932.7503 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  468.7088 sec.\n",
            "-------------\n",
            "Epoch 10/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 1620 || Loss: 5.0429 || 10iter: 22.0101 sec.\n",
            "イテレーション 1630 || Loss: 4.8004 || 10iter: 24.9495 sec.\n",
            "イテレーション 1640 || Loss: 4.8628 || 10iter: 25.9528 sec.\n",
            "イテレーション 1650 || Loss: 5.0314 || 10iter: 25.4742 sec.\n",
            "イテレーション 1660 || Loss: 5.6640 || 10iter: 25.2137 sec.\n",
            "イテレーション 1670 || Loss: 5.1925 || 10iter: 25.2302 sec.\n",
            "イテレーション 1680 || Loss: 5.2849 || 10iter: 24.8144 sec.\n",
            "イテレーション 1690 || Loss: 5.1626 || 10iter: 25.0911 sec.\n",
            "イテレーション 1700 || Loss: 5.1173 || 10iter: 25.3174 sec.\n",
            "イテレーション 1710 || Loss: 5.4805 || 10iter: 24.9862 sec.\n",
            "イテレーション 1720 || Loss: 4.8205 || 10iter: 24.5695 sec.\n",
            "イテレーション 1730 || Loss: 5.2657 || 10iter: 25.3115 sec.\n",
            "イテレーション 1740 || Loss: 5.1257 || 10iter: 24.6143 sec.\n",
            "イテレーション 1750 || Loss: 5.2919 || 10iter: 25.0463 sec.\n",
            "イテレーション 1760 || Loss: 5.0569 || 10iter: 25.1804 sec.\n",
            "イテレーション 1770 || Loss: 4.9550 || 10iter: 24.7164 sec.\n",
            "イテレーション 1780 || Loss: 5.1108 || 10iter: 24.9410 sec.\n",
            "イテレーション 1790 || Loss: 5.1409 || 10iter: 24.3755 sec.\n",
            "-------------\n",
            "（val）\n",
            "-------------\n",
            "epoch 10 || Epoch_TRAIN_Loss:908.7667 ||Epoch_VAL_Loss:920.4617\n",
            "timer:  655.3795 sec.\n",
            "-------------\n",
            "Epoch 11/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 1800 || Loss: 5.1467 || 10iter: 25.4394 sec.\n",
            "イテレーション 1810 || Loss: 5.6437 || 10iter: 25.0023 sec.\n",
            "イテレーション 1820 || Loss: 5.1184 || 10iter: 24.8551 sec.\n",
            "イテレーション 1830 || Loss: 5.2195 || 10iter: 25.0154 sec.\n",
            "イテレーション 1840 || Loss: 4.9978 || 10iter: 24.6792 sec.\n",
            "イテレーション 1850 || Loss: 5.0020 || 10iter: 24.9580 sec.\n",
            "イテレーション 1860 || Loss: 4.6406 || 10iter: 24.7882 sec.\n",
            "イテレーション 1870 || Loss: 4.8109 || 10iter: 24.9844 sec.\n",
            "イテレーション 1880 || Loss: 4.9531 || 10iter: 24.6786 sec.\n",
            "イテレーション 1890 || Loss: 4.7422 || 10iter: 25.4646 sec.\n",
            "イテレーション 1900 || Loss: 4.9500 || 10iter: 24.9831 sec.\n",
            "イテレーション 1910 || Loss: 5.0722 || 10iter: 25.0348 sec.\n",
            "イテレーション 1920 || Loss: 5.0103 || 10iter: 25.0068 sec.\n",
            "イテレーション 1930 || Loss: 5.4546 || 10iter: 24.9308 sec.\n",
            "イテレーション 1940 || Loss: 5.3097 || 10iter: 25.1391 sec.\n",
            "イテレーション 1950 || Loss: 4.8010 || 10iter: 24.7470 sec.\n",
            "イテレーション 1960 || Loss: 4.5530 || 10iter: 24.6388 sec.\n",
            "-------------\n",
            "epoch 11 || Epoch_TRAIN_Loss:893.2732 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  470.8961 sec.\n",
            "-------------\n",
            "Epoch 12/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 1970 || Loss: 4.6286 || 10iter: 1.3408 sec.\n",
            "イテレーション 1980 || Loss: 4.8432 || 10iter: 25.1475 sec.\n",
            "イテレーション 1990 || Loss: 4.7085 || 10iter: 24.8737 sec.\n",
            "イテレーション 2000 || Loss: 4.7094 || 10iter: 25.0320 sec.\n",
            "イテレーション 2010 || Loss: 4.7590 || 10iter: 24.7392 sec.\n",
            "イテレーション 2020 || Loss: 4.6590 || 10iter: 25.1010 sec.\n",
            "イテレーション 2030 || Loss: 5.6489 || 10iter: 25.5865 sec.\n",
            "イテレーション 2040 || Loss: 4.3803 || 10iter: 25.1617 sec.\n",
            "イテレーション 2050 || Loss: 4.6908 || 10iter: 24.7520 sec.\n",
            "イテレーション 2060 || Loss: 4.7004 || 10iter: 25.7134 sec.\n",
            "イテレーション 2070 || Loss: 4.7990 || 10iter: 25.0591 sec.\n",
            "イテレーション 2080 || Loss: 4.8488 || 10iter: 25.0447 sec.\n",
            "イテレーション 2090 || Loss: 4.5452 || 10iter: 24.8983 sec.\n",
            "イテレーション 2100 || Loss: 5.3507 || 10iter: 25.0313 sec.\n",
            "イテレーション 2110 || Loss: 5.0877 || 10iter: 26.6208 sec.\n",
            "イテレーション 2120 || Loss: 5.8172 || 10iter: 24.8361 sec.\n",
            "イテレーション 2130 || Loss: 4.7325 || 10iter: 24.6166 sec.\n",
            "イテレーション 2140 || Loss: 5.5347 || 10iter: 24.6234 sec.\n",
            "-------------\n",
            "epoch 12 || Epoch_TRAIN_Loss:870.5595 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  472.6229 sec.\n",
            "-------------\n",
            "Epoch 13/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 2150 || Loss: 4.7870 || 10iter: 3.8938 sec.\n",
            "イテレーション 2160 || Loss: 4.5650 || 10iter: 25.0218 sec.\n",
            "イテレーション 2170 || Loss: 4.8785 || 10iter: 25.4825 sec.\n",
            "イテレーション 2180 || Loss: 4.8344 || 10iter: 24.8248 sec.\n",
            "イテレーション 2190 || Loss: 4.6123 || 10iter: 24.9503 sec.\n",
            "イテレーション 2200 || Loss: 4.9515 || 10iter: 24.7351 sec.\n",
            "イテレーション 2210 || Loss: 4.3785 || 10iter: 25.5255 sec.\n",
            "イテレーション 2220 || Loss: 5.2058 || 10iter: 25.2327 sec.\n",
            "イテレーション 2230 || Loss: 4.7098 || 10iter: 24.8640 sec.\n",
            "イテレーション 2240 || Loss: 4.6723 || 10iter: 25.2443 sec.\n",
            "イテレーション 2250 || Loss: 4.9158 || 10iter: 24.6849 sec.\n",
            "イテレーション 2260 || Loss: 4.6844 || 10iter: 25.0101 sec.\n",
            "イテレーション 2270 || Loss: 4.6144 || 10iter: 24.6522 sec.\n",
            "イテレーション 2280 || Loss: 4.7130 || 10iter: 24.9561 sec.\n",
            "イテレーション 2290 || Loss: 4.5957 || 10iter: 24.7766 sec.\n",
            "イテレーション 2300 || Loss: 5.6454 || 10iter: 24.8394 sec.\n",
            "イテレーション 2310 || Loss: 4.9393 || 10iter: 24.5213 sec.\n",
            "イテレーション 2320 || Loss: 5.0173 || 10iter: 24.8807 sec.\n",
            "-------------\n",
            "epoch 13 || Epoch_TRAIN_Loss:854.9037 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  469.8673 sec.\n",
            "-------------\n",
            "Epoch 14/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 2330 || Loss: 4.6809 || 10iter: 6.7605 sec.\n",
            "イテレーション 2340 || Loss: 5.0421 || 10iter: 25.0263 sec.\n",
            "イテレーション 2350 || Loss: 4.7536 || 10iter: 24.8255 sec.\n",
            "イテレーション 2360 || Loss: 5.0792 || 10iter: 24.7178 sec.\n",
            "イテレーション 2370 || Loss: 5.1527 || 10iter: 24.7376 sec.\n",
            "イテレーション 2380 || Loss: 5.0807 || 10iter: 26.2179 sec.\n",
            "イテレーション 2390 || Loss: 4.7228 || 10iter: 24.9426 sec.\n",
            "イテレーション 2400 || Loss: 4.9499 || 10iter: 24.8275 sec.\n",
            "イテレーション 2410 || Loss: 5.4266 || 10iter: 25.1838 sec.\n",
            "イテレーション 2420 || Loss: 5.4479 || 10iter: 24.8797 sec.\n",
            "イテレーション 2430 || Loss: 4.6919 || 10iter: 25.2886 sec.\n",
            "イテレーション 2440 || Loss: 4.7926 || 10iter: 25.2380 sec.\n",
            "イテレーション 2450 || Loss: 4.7194 || 10iter: 25.1725 sec.\n",
            "イテレーション 2460 || Loss: 4.4475 || 10iter: 24.8123 sec.\n",
            "イテレーション 2470 || Loss: 4.7008 || 10iter: 25.6924 sec.\n",
            "イテレーション 2480 || Loss: 4.6440 || 10iter: 25.2946 sec.\n",
            "イテレーション 2490 || Loss: 4.7733 || 10iter: 24.7530 sec.\n",
            "イテレーション 2500 || Loss: 4.9835 || 10iter: 24.9859 sec.\n",
            "-------------\n",
            "epoch 14 || Epoch_TRAIN_Loss:847.3238 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  472.6621 sec.\n",
            "-------------\n",
            "Epoch 15/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 2510 || Loss: 4.2060 || 10iter: 9.0887 sec.\n",
            "イテレーション 2520 || Loss: 4.4239 || 10iter: 25.0988 sec.\n",
            "イテレーション 2530 || Loss: 4.5607 || 10iter: 24.9513 sec.\n",
            "イテレーション 2540 || Loss: 4.7732 || 10iter: 24.8147 sec.\n",
            "イテレーション 2550 || Loss: 3.9168 || 10iter: 24.9486 sec.\n",
            "イテレーション 2560 || Loss: 4.7534 || 10iter: 24.8403 sec.\n",
            "イテレーション 2570 || Loss: 4.7647 || 10iter: 24.8082 sec.\n",
            "イテレーション 2580 || Loss: 4.2892 || 10iter: 24.8852 sec.\n",
            "イテレーション 2590 || Loss: 4.7298 || 10iter: 25.2386 sec.\n",
            "イテレーション 2600 || Loss: 4.5594 || 10iter: 25.4740 sec.\n",
            "イテレーション 2610 || Loss: 4.0083 || 10iter: 25.0444 sec.\n",
            "イテレーション 2620 || Loss: 4.8508 || 10iter: 24.9083 sec.\n",
            "イテレーション 2630 || Loss: 4.7440 || 10iter: 24.8161 sec.\n",
            "イテレーション 2640 || Loss: 4.2911 || 10iter: 24.6264 sec.\n",
            "イテレーション 2650 || Loss: 4.5037 || 10iter: 25.9016 sec.\n",
            "イテレーション 2660 || Loss: 4.9528 || 10iter: 25.0221 sec.\n",
            "イテレーション 2670 || Loss: 5.0184 || 10iter: 24.7244 sec.\n",
            "イテレーション 2680 || Loss: 4.6365 || 10iter: 24.8316 sec.\n",
            "-------------\n",
            "epoch 15 || Epoch_TRAIN_Loss:820.3020 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  470.4208 sec.\n",
            "-------------\n",
            "Epoch 16/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 2690 || Loss: 4.1642 || 10iter: 11.8652 sec.\n",
            "イテレーション 2700 || Loss: 4.4453 || 10iter: 24.8480 sec.\n",
            "イテレーション 2710 || Loss: 4.0122 || 10iter: 24.7813 sec.\n",
            "イテレーション 2720 || Loss: 4.5531 || 10iter: 25.1627 sec.\n",
            "イテレーション 2730 || Loss: 4.7164 || 10iter: 24.9951 sec.\n",
            "イテレーション 2740 || Loss: 4.8079 || 10iter: 25.0804 sec.\n",
            "イテレーション 2750 || Loss: 4.7358 || 10iter: 24.8426 sec.\n",
            "イテレーション 2760 || Loss: 4.5644 || 10iter: 24.9360 sec.\n",
            "イテレーション 2770 || Loss: 4.3324 || 10iter: 24.7476 sec.\n",
            "イテレーション 2780 || Loss: 4.4928 || 10iter: 25.4345 sec.\n",
            "イテレーション 2790 || Loss: 4.7784 || 10iter: 25.1881 sec.\n",
            "イテレーション 2800 || Loss: 4.4134 || 10iter: 24.8435 sec.\n",
            "イテレーション 2810 || Loss: 4.7614 || 10iter: 24.9985 sec.\n",
            "イテレーション 2820 || Loss: 4.3821 || 10iter: 24.9332 sec.\n",
            "イテレーション 2830 || Loss: 5.3114 || 10iter: 24.8723 sec.\n",
            "イテレーション 2840 || Loss: 4.9909 || 10iter: 25.3287 sec.\n",
            "イテレーション 2850 || Loss: 4.0023 || 10iter: 24.7528 sec.\n",
            "イテレーション 2860 || Loss: 4.5875 || 10iter: 25.2518 sec.\n",
            "-------------\n",
            "epoch 16 || Epoch_TRAIN_Loss:807.0209 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  470.7241 sec.\n",
            "-------------\n",
            "Epoch 17/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 2870 || Loss: 4.8412 || 10iter: 14.2122 sec.\n",
            "イテレーション 2880 || Loss: 4.4173 || 10iter: 24.8198 sec.\n",
            "イテレーション 2890 || Loss: 4.5172 || 10iter: 25.1123 sec.\n",
            "イテレーション 2900 || Loss: 5.1673 || 10iter: 25.1481 sec.\n",
            "イテレーション 2910 || Loss: 4.6914 || 10iter: 24.7231 sec.\n",
            "イテレーション 2920 || Loss: 4.1053 || 10iter: 24.8808 sec.\n",
            "イテレーション 2930 || Loss: 4.4472 || 10iter: 25.3185 sec.\n",
            "イテレーション 2940 || Loss: 4.4764 || 10iter: 24.9794 sec.\n",
            "イテレーション 2950 || Loss: 4.4804 || 10iter: 24.9043 sec.\n",
            "イテレーション 2960 || Loss: 4.9166 || 10iter: 25.0194 sec.\n",
            "イテレーション 2970 || Loss: 3.9854 || 10iter: 24.6267 sec.\n",
            "イテレーション 2980 || Loss: 4.6882 || 10iter: 24.6803 sec.\n",
            "イテレーション 2990 || Loss: 3.9474 || 10iter: 24.9780 sec.\n",
            "イテレーション 3000 || Loss: 4.8621 || 10iter: 24.6239 sec.\n",
            "イテレーション 3010 || Loss: 3.8944 || 10iter: 25.0700 sec.\n",
            "イテレーション 3020 || Loss: 4.8817 || 10iter: 24.8899 sec.\n",
            "イテレーション 3030 || Loss: 3.7843 || 10iter: 25.3458 sec.\n",
            "イテレーション 3040 || Loss: 4.2168 || 10iter: 25.3680 sec.\n",
            "-------------\n",
            "epoch 17 || Epoch_TRAIN_Loss:799.9635 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  470.1025 sec.\n",
            "-------------\n",
            "Epoch 18/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 3050 || Loss: 4.1220 || 10iter: 16.9872 sec.\n",
            "イテレーション 3060 || Loss: 4.9288 || 10iter: 25.5399 sec.\n",
            "イテレーション 3070 || Loss: 4.5618 || 10iter: 25.0689 sec.\n",
            "イテレーション 3080 || Loss: 4.1798 || 10iter: 24.6121 sec.\n",
            "イテレーション 3090 || Loss: 4.4516 || 10iter: 24.8573 sec.\n",
            "イテレーション 3100 || Loss: 3.9901 || 10iter: 24.8677 sec.\n",
            "イテレーション 3110 || Loss: 4.0506 || 10iter: 24.8738 sec.\n",
            "イテレーション 3120 || Loss: 4.6874 || 10iter: 25.2591 sec.\n",
            "イテレーション 3130 || Loss: 4.8192 || 10iter: 24.8854 sec.\n",
            "イテレーション 3140 || Loss: 4.9059 || 10iter: 25.7800 sec.\n",
            "イテレーション 3150 || Loss: 4.5678 || 10iter: 24.9820 sec.\n",
            "イテレーション 3160 || Loss: 4.4135 || 10iter: 25.1730 sec.\n",
            "イテレーション 3170 || Loss: 4.4311 || 10iter: 24.8149 sec.\n",
            "イテレーション 3180 || Loss: 4.7205 || 10iter: 24.5840 sec.\n",
            "イテレーション 3190 || Loss: 4.6676 || 10iter: 24.6820 sec.\n",
            "イテレーション 3200 || Loss: 4.6192 || 10iter: 25.2187 sec.\n",
            "イテレーション 3210 || Loss: 3.5592 || 10iter: 25.0662 sec.\n",
            "イテレーション 3220 || Loss: 4.3090 || 10iter: 24.8197 sec.\n",
            "-------------\n",
            "epoch 18 || Epoch_TRAIN_Loss:782.9570 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  471.0845 sec.\n",
            "-------------\n",
            "Epoch 19/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 3230 || Loss: 4.5622 || 10iter: 19.5633 sec.\n",
            "イテレーション 3240 || Loss: 4.3665 || 10iter: 24.8931 sec.\n",
            "イテレーション 3250 || Loss: 4.6427 || 10iter: 24.9221 sec.\n",
            "イテレーション 3260 || Loss: 4.6975 || 10iter: 25.0099 sec.\n",
            "イテレーション 3270 || Loss: 4.5503 || 10iter: 25.2037 sec.\n",
            "イテレーション 3280 || Loss: 4.0676 || 10iter: 24.8677 sec.\n",
            "イテレーション 3290 || Loss: 4.3210 || 10iter: 24.8168 sec.\n",
            "イテレーション 3300 || Loss: 4.4353 || 10iter: 24.8045 sec.\n",
            "イテレーション 3310 || Loss: 4.3610 || 10iter: 24.8119 sec.\n",
            "イテレーション 3320 || Loss: 4.3185 || 10iter: 24.6238 sec.\n",
            "イテレーション 3330 || Loss: 4.8634 || 10iter: 24.7495 sec.\n",
            "イテレーション 3340 || Loss: 4.0057 || 10iter: 25.2747 sec.\n",
            "イテレーション 3350 || Loss: 4.4540 || 10iter: 24.7896 sec.\n",
            "イテレーション 3360 || Loss: 4.0636 || 10iter: 25.4162 sec.\n",
            "イテレーション 3370 || Loss: 4.0757 || 10iter: 24.6742 sec.\n",
            "イテレーション 3380 || Loss: 5.0482 || 10iter: 25.9596 sec.\n",
            "イテレーション 3390 || Loss: 4.0372 || 10iter: 24.9500 sec.\n",
            "イテレーション 3400 || Loss: 3.9022 || 10iter: 25.1771 sec.\n",
            "-------------\n",
            "epoch 19 || Epoch_TRAIN_Loss:775.0653 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  470.6859 sec.\n",
            "-------------\n",
            "Epoch 20/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 3410 || Loss: 4.5797 || 10iter: 21.9740 sec.\n",
            "イテレーション 3420 || Loss: 4.0613 || 10iter: 24.6194 sec.\n",
            "イテレーション 3430 || Loss: 4.6232 || 10iter: 25.2077 sec.\n",
            "イテレーション 3440 || Loss: 3.8449 || 10iter: 24.7979 sec.\n",
            "イテレーション 3450 || Loss: 4.1695 || 10iter: 25.9199 sec.\n",
            "イテレーション 3460 || Loss: 4.1990 || 10iter: 25.1361 sec.\n",
            "イテレーション 3470 || Loss: 4.7843 || 10iter: 25.8310 sec.\n",
            "イテレーション 3480 || Loss: 4.3173 || 10iter: 25.2891 sec.\n",
            "イテレーション 3490 || Loss: 4.4645 || 10iter: 24.8509 sec.\n",
            "イテレーション 3500 || Loss: 3.9647 || 10iter: 25.0680 sec.\n",
            "イテレーション 3510 || Loss: 4.3945 || 10iter: 24.9637 sec.\n",
            "イテレーション 3520 || Loss: 3.8053 || 10iter: 24.6574 sec.\n",
            "イテレーション 3530 || Loss: 4.4276 || 10iter: 25.0948 sec.\n",
            "イテレーション 3540 || Loss: 4.5726 || 10iter: 24.7728 sec.\n",
            "イテレーション 3550 || Loss: 3.8936 || 10iter: 25.2428 sec.\n",
            "イテレーション 3560 || Loss: 4.6560 || 10iter: 25.1047 sec.\n",
            "イテレーション 3570 || Loss: 4.4146 || 10iter: 25.6714 sec.\n",
            "イテレーション 3580 || Loss: 4.6592 || 10iter: 24.9693 sec.\n",
            "-------------\n",
            "（val）\n",
            "-------------\n",
            "epoch 20 || Epoch_TRAIN_Loss:765.2673 ||Epoch_VAL_Loss:790.7451\n",
            "timer:  649.0347 sec.\n",
            "-------------\n",
            "Epoch 21/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 3590 || Loss: 4.3988 || 10iter: 24.8571 sec.\n",
            "イテレーション 3600 || Loss: 3.7392 || 10iter: 25.2466 sec.\n",
            "イテレーション 3610 || Loss: 4.2822 || 10iter: 25.4954 sec.\n",
            "イテレーション 3620 || Loss: 4.0068 || 10iter: 25.3217 sec.\n",
            "イテレーション 3630 || Loss: 4.5713 || 10iter: 25.3709 sec.\n",
            "イテレーション 3640 || Loss: 4.6644 || 10iter: 25.0101 sec.\n",
            "イテレーション 3650 || Loss: 4.0557 || 10iter: 24.9891 sec.\n",
            "イテレーション 3660 || Loss: 3.9041 || 10iter: 25.4757 sec.\n",
            "イテレーション 3670 || Loss: 3.9744 || 10iter: 24.8292 sec.\n",
            "イテレーション 3680 || Loss: 4.5207 || 10iter: 25.5343 sec.\n",
            "イテレーション 3690 || Loss: 4.5556 || 10iter: 25.2564 sec.\n",
            "イテレーション 3700 || Loss: 4.3297 || 10iter: 25.2833 sec.\n",
            "イテレーション 3710 || Loss: 4.2115 || 10iter: 25.3207 sec.\n",
            "イテレーション 3720 || Loss: 4.2508 || 10iter: 24.9683 sec.\n",
            "イテレーション 3730 || Loss: 4.3589 || 10iter: 25.0451 sec.\n",
            "イテレーション 3740 || Loss: 4.0342 || 10iter: 24.7541 sec.\n",
            "イテレーション 3750 || Loss: 4.4063 || 10iter: 24.6559 sec.\n",
            "-------------\n",
            "epoch 21 || Epoch_TRAIN_Loss:750.2315 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  473.3494 sec.\n",
            "-------------\n",
            "Epoch 22/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 3760 || Loss: 4.2299 || 10iter: 1.2670 sec.\n",
            "イテレーション 3770 || Loss: 4.1607 || 10iter: 24.5144 sec.\n",
            "イテレーション 3780 || Loss: 4.1876 || 10iter: 25.1251 sec.\n",
            "イテレーション 3790 || Loss: 4.2901 || 10iter: 24.6410 sec.\n",
            "イテレーション 3800 || Loss: 4.6124 || 10iter: 24.9018 sec.\n",
            "イテレーション 3810 || Loss: 4.4423 || 10iter: 24.9819 sec.\n",
            "イテレーション 3820 || Loss: 4.0532 || 10iter: 25.1956 sec.\n",
            "イテレーション 3830 || Loss: 3.6798 || 10iter: 25.0531 sec.\n",
            "イテレーション 3840 || Loss: 3.6658 || 10iter: 25.1041 sec.\n",
            "イテレーション 3850 || Loss: 3.8115 || 10iter: 24.7535 sec.\n",
            "イテレーション 3860 || Loss: 4.5699 || 10iter: 24.8920 sec.\n",
            "イテレーション 3870 || Loss: 4.1347 || 10iter: 24.9558 sec.\n",
            "イテレーション 3880 || Loss: 4.3134 || 10iter: 25.0666 sec.\n",
            "イテレーション 3890 || Loss: 4.5090 || 10iter: 24.9976 sec.\n",
            "イテレーション 3900 || Loss: 4.3156 || 10iter: 24.8644 sec.\n",
            "イテレーション 3910 || Loss: 4.3384 || 10iter: 25.1699 sec.\n",
            "イテレーション 3920 || Loss: 4.5096 || 10iter: 25.1476 sec.\n",
            "イテレーション 3930 || Loss: 3.8442 || 10iter: 24.7756 sec.\n",
            "-------------\n",
            "epoch 22 || Epoch_TRAIN_Loss:751.9433 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  469.6863 sec.\n",
            "-------------\n",
            "Epoch 23/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 3940 || Loss: 3.9424 || 10iter: 3.9241 sec.\n",
            "イテレーション 3950 || Loss: 3.5378 || 10iter: 24.7441 sec.\n",
            "イテレーション 3960 || Loss: 4.2925 || 10iter: 24.8815 sec.\n",
            "イテレーション 3970 || Loss: 4.1435 || 10iter: 25.5436 sec.\n",
            "イテレーション 3980 || Loss: 3.9110 || 10iter: 24.7877 sec.\n",
            "イテレーション 3990 || Loss: 4.4251 || 10iter: 24.8392 sec.\n",
            "イテレーション 4000 || Loss: 3.9544 || 10iter: 24.5078 sec.\n",
            "イテレーション 4010 || Loss: 4.0674 || 10iter: 25.3436 sec.\n",
            "イテレーション 4020 || Loss: 4.1574 || 10iter: 25.1640 sec.\n",
            "イテレーション 4030 || Loss: 4.1164 || 10iter: 24.5984 sec.\n",
            "イテレーション 4040 || Loss: 3.8823 || 10iter: 25.0236 sec.\n",
            "イテレーション 4050 || Loss: 4.0336 || 10iter: 24.4431 sec.\n",
            "イテレーション 4060 || Loss: 4.2084 || 10iter: 24.7743 sec.\n",
            "イテレーション 4070 || Loss: 3.9569 || 10iter: 24.7495 sec.\n",
            "イテレーション 4080 || Loss: 3.9464 || 10iter: 25.2180 sec.\n",
            "イテレーション 4090 || Loss: 4.5217 || 10iter: 25.4778 sec.\n",
            "イテレーション 4100 || Loss: 4.2856 || 10iter: 25.0928 sec.\n",
            "イテレーション 4110 || Loss: 4.2475 || 10iter: 25.1638 sec.\n",
            "-------------\n",
            "epoch 23 || Epoch_TRAIN_Loss:738.9508 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  470.1721 sec.\n",
            "-------------\n",
            "Epoch 24/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 4120 || Loss: 3.9971 || 10iter: 6.5905 sec.\n",
            "イテレーション 4130 || Loss: 4.3232 || 10iter: 24.9466 sec.\n",
            "イテレーション 4140 || Loss: 4.1121 || 10iter: 24.7098 sec.\n",
            "イテレーション 4150 || Loss: 3.6657 || 10iter: 24.5344 sec.\n",
            "イテレーション 4160 || Loss: 3.9681 || 10iter: 24.9416 sec.\n",
            "イテレーション 4170 || Loss: 4.1321 || 10iter: 25.5273 sec.\n",
            "イテレーション 4180 || Loss: 3.9221 || 10iter: 24.8205 sec.\n",
            "イテレーション 4190 || Loss: 4.1670 || 10iter: 24.6145 sec.\n",
            "イテレーション 4200 || Loss: 4.0620 || 10iter: 24.9368 sec.\n",
            "イテレーション 4210 || Loss: 4.3166 || 10iter: 25.0648 sec.\n",
            "イテレーション 4220 || Loss: 3.9246 || 10iter: 24.5984 sec.\n",
            "イテレーション 4230 || Loss: 3.8355 || 10iter: 25.1863 sec.\n",
            "イテレーション 4240 || Loss: 4.2546 || 10iter: 24.7409 sec.\n",
            "イテレーション 4250 || Loss: 4.4322 || 10iter: 24.6712 sec.\n",
            "イテレーション 4260 || Loss: 4.8804 || 10iter: 24.8138 sec.\n",
            "イテレーション 4270 || Loss: 4.6628 || 10iter: 24.7409 sec.\n",
            "イテレーション 4280 || Loss: 4.5402 || 10iter: 25.4644 sec.\n",
            "イテレーション 4290 || Loss: 4.0516 || 10iter: 25.4023 sec.\n",
            "-------------\n",
            "epoch 24 || Epoch_TRAIN_Loss:728.8541 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  469.2796 sec.\n",
            "-------------\n",
            "Epoch 25/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 4300 || Loss: 3.9854 || 10iter: 9.3869 sec.\n",
            "イテレーション 4310 || Loss: 4.2323 || 10iter: 25.1718 sec.\n",
            "イテレーション 4320 || Loss: 4.1860 || 10iter: 25.1113 sec.\n",
            "イテレーション 4330 || Loss: 3.8360 || 10iter: 25.1635 sec.\n",
            "イテレーション 4340 || Loss: 4.0206 || 10iter: 24.8087 sec.\n",
            "イテレーション 4350 || Loss: 4.4970 || 10iter: 24.8079 sec.\n",
            "イテレーション 4360 || Loss: 4.5544 || 10iter: 24.8187 sec.\n",
            "イテレーション 4370 || Loss: 3.6500 || 10iter: 24.9799 sec.\n",
            "イテレーション 4380 || Loss: 4.1488 || 10iter: 26.0563 sec.\n",
            "イテレーション 4390 || Loss: 4.0961 || 10iter: 25.1750 sec.\n",
            "イテレーション 4400 || Loss: 3.9669 || 10iter: 25.3561 sec.\n",
            "イテレーション 4410 || Loss: 3.9938 || 10iter: 25.0306 sec.\n",
            "イテレーション 4420 || Loss: 3.7646 || 10iter: 25.8284 sec.\n",
            "イテレーション 4430 || Loss: 3.9271 || 10iter: 25.1490 sec.\n",
            "イテレーション 4440 || Loss: 4.2849 || 10iter: 24.8988 sec.\n",
            "イテレーション 4450 || Loss: 3.8659 || 10iter: 25.0290 sec.\n",
            "イテレーション 4460 || Loss: 4.1809 || 10iter: 24.8683 sec.\n",
            "イテレーション 4470 || Loss: 4.0437 || 10iter: 25.2986 sec.\n",
            "-------------\n",
            "epoch 25 || Epoch_TRAIN_Loss:721.9948 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  473.6599 sec.\n",
            "-------------\n",
            "Epoch 26/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 4480 || Loss: 4.1101 || 10iter: 12.0155 sec.\n",
            "イテレーション 4490 || Loss: 3.9849 || 10iter: 25.4868 sec.\n",
            "イテレーション 4500 || Loss: 3.7911 || 10iter: 25.3018 sec.\n",
            "イテレーション 4510 || Loss: 3.3669 || 10iter: 25.7434 sec.\n",
            "イテレーション 4520 || Loss: 4.0826 || 10iter: 25.0029 sec.\n",
            "イテレーション 4530 || Loss: 3.5713 || 10iter: 25.4606 sec.\n",
            "イテレーション 4540 || Loss: 3.8343 || 10iter: 25.7035 sec.\n",
            "イテレーション 4550 || Loss: 3.9532 || 10iter: 26.4671 sec.\n",
            "イテレーション 4560 || Loss: 4.5409 || 10iter: 25.0571 sec.\n",
            "イテレーション 4570 || Loss: 4.4223 || 10iter: 25.7095 sec.\n",
            "イテレーション 4580 || Loss: 4.1292 || 10iter: 24.9523 sec.\n",
            "イテレーション 4590 || Loss: 3.9308 || 10iter: 25.0085 sec.\n",
            "イテレーション 4600 || Loss: 3.8320 || 10iter: 25.6489 sec.\n",
            "イテレーション 4610 || Loss: 4.1959 || 10iter: 24.9645 sec.\n",
            "イテレーション 4620 || Loss: 4.0590 || 10iter: 25.5800 sec.\n",
            "イテレーション 4630 || Loss: 3.9353 || 10iter: 25.4881 sec.\n",
            "イテレーション 4640 || Loss: 4.0882 || 10iter: 25.3530 sec.\n",
            "イテレーション 4650 || Loss: 3.9987 || 10iter: 25.4613 sec.\n",
            "-------------\n",
            "epoch 26 || Epoch_TRAIN_Loss:711.7979 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  478.4869 sec.\n",
            "-------------\n",
            "Epoch 27/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 4660 || Loss: 4.0176 || 10iter: 14.5088 sec.\n",
            "イテレーション 4670 || Loss: 4.0033 || 10iter: 26.0014 sec.\n",
            "イテレーション 4680 || Loss: 4.2242 || 10iter: 25.2709 sec.\n",
            "イテレーション 4690 || Loss: 4.0902 || 10iter: 25.0786 sec.\n",
            "イテレーション 4700 || Loss: 3.5867 || 10iter: 25.5596 sec.\n",
            "イテレーション 4710 || Loss: 4.0436 || 10iter: 25.0120 sec.\n",
            "イテレーション 4720 || Loss: 4.1984 || 10iter: 24.9872 sec.\n",
            "イテレーション 4730 || Loss: 4.4387 || 10iter: 25.0043 sec.\n",
            "イテレーション 4740 || Loss: 3.6397 || 10iter: 25.0548 sec.\n",
            "イテレーション 4750 || Loss: 4.0262 || 10iter: 25.1182 sec.\n",
            "イテレーション 4760 || Loss: 3.7787 || 10iter: 25.1524 sec.\n",
            "イテレーション 4770 || Loss: 4.1047 || 10iter: 25.7408 sec.\n",
            "イテレーション 4780 || Loss: 3.9784 || 10iter: 24.9730 sec.\n",
            "イテレーション 4790 || Loss: 3.5345 || 10iter: 25.7604 sec.\n",
            "イテレーション 4800 || Loss: 4.2015 || 10iter: 25.0892 sec.\n",
            "イテレーション 4810 || Loss: 4.2476 || 10iter: 25.3543 sec.\n",
            "イテレーション 4820 || Loss: 4.3386 || 10iter: 25.1950 sec.\n",
            "イテレーション 4830 || Loss: 4.0819 || 10iter: 25.0608 sec.\n",
            "-------------\n",
            "epoch 27 || Epoch_TRAIN_Loss:709.1653 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  475.4504 sec.\n",
            "-------------\n",
            "Epoch 28/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 4840 || Loss: 3.5363 || 10iter: 17.0123 sec.\n",
            "イテレーション 4850 || Loss: 3.9134 || 10iter: 25.1664 sec.\n",
            "イテレーション 4860 || Loss: 3.5880 || 10iter: 25.4068 sec.\n",
            "イテレーション 4870 || Loss: 3.9969 || 10iter: 25.3740 sec.\n",
            "イテレーション 4880 || Loss: 3.6622 || 10iter: 25.0817 sec.\n",
            "イテレーション 4890 || Loss: 4.0915 || 10iter: 24.7902 sec.\n",
            "イテレーション 4900 || Loss: 4.0645 || 10iter: 25.2072 sec.\n",
            "イテレーション 4910 || Loss: 3.3081 || 10iter: 24.8832 sec.\n",
            "イテレーション 4920 || Loss: 4.1683 || 10iter: 24.9728 sec.\n",
            "イテレーション 4930 || Loss: 3.9815 || 10iter: 24.9391 sec.\n",
            "イテレーション 4940 || Loss: 3.7239 || 10iter: 25.0154 sec.\n",
            "イテレーション 4950 || Loss: 3.6000 || 10iter: 24.7145 sec.\n",
            "イテレーション 4960 || Loss: 4.2469 || 10iter: 24.7311 sec.\n",
            "イテレーション 4970 || Loss: 4.2776 || 10iter: 25.5332 sec.\n",
            "イテレーション 4980 || Loss: 3.5480 || 10iter: 25.3684 sec.\n",
            "イテレーション 4990 || Loss: 4.0698 || 10iter: 25.1708 sec.\n",
            "イテレーション 5000 || Loss: 3.8611 || 10iter: 25.5052 sec.\n",
            "イテレーション 5010 || Loss: 4.1644 || 10iter: 25.1333 sec.\n",
            "-------------\n",
            "epoch 28 || Epoch_TRAIN_Loss:698.8439 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  472.5971 sec.\n",
            "-------------\n",
            "Epoch 29/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 5020 || Loss: 4.6341 || 10iter: 20.2382 sec.\n",
            "イテレーション 5030 || Loss: 3.9258 || 10iter: 25.2550 sec.\n",
            "イテレーション 5040 || Loss: 3.4347 || 10iter: 25.1854 sec.\n",
            "イテレーション 5050 || Loss: 3.9147 || 10iter: 24.6144 sec.\n",
            "イテレーション 5060 || Loss: 4.2112 || 10iter: 25.1793 sec.\n",
            "イテレーション 5070 || Loss: 3.5170 || 10iter: 24.8759 sec.\n",
            "イテレーション 5080 || Loss: 3.2058 || 10iter: 24.7889 sec.\n",
            "イテレーション 5090 || Loss: 4.0235 || 10iter: 24.8198 sec.\n",
            "イテレーション 5100 || Loss: 3.9470 || 10iter: 26.2742 sec.\n",
            "イテレーション 5110 || Loss: 3.6040 || 10iter: 25.7798 sec.\n",
            "イテレーション 5120 || Loss: 3.5076 || 10iter: 25.0475 sec.\n",
            "イテレーション 5130 || Loss: 3.2991 || 10iter: 25.3464 sec.\n",
            "イテレーション 5140 || Loss: 3.8640 || 10iter: 25.2616 sec.\n",
            "イテレーション 5150 || Loss: 3.6555 || 10iter: 25.1964 sec.\n",
            "イテレーション 5160 || Loss: 4.1590 || 10iter: 25.1686 sec.\n",
            "イテレーション 5170 || Loss: 3.8687 || 10iter: 25.0524 sec.\n",
            "イテレーション 5180 || Loss: 3.6219 || 10iter: 25.3636 sec.\n",
            "イテレーション 5190 || Loss: 4.2479 || 10iter: 25.4719 sec.\n",
            "-------------\n",
            "epoch 29 || Epoch_TRAIN_Loss:700.0715 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  475.0777 sec.\n",
            "-------------\n",
            "Epoch 30/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 5200 || Loss: 3.8744 || 10iter: 22.6713 sec.\n",
            "イテレーション 5210 || Loss: 3.4890 || 10iter: 25.4936 sec.\n",
            "イテレーション 5220 || Loss: 3.8795 || 10iter: 25.1905 sec.\n",
            "イテレーション 5230 || Loss: 4.2053 || 10iter: 25.2017 sec.\n",
            "イテレーション 5240 || Loss: 3.7567 || 10iter: 25.7696 sec.\n",
            "イテレーション 5250 || Loss: 3.5502 || 10iter: 25.0434 sec.\n",
            "イテレーション 5260 || Loss: 3.8747 || 10iter: 25.1835 sec.\n",
            "イテレーション 5270 || Loss: 3.9412 || 10iter: 25.1041 sec.\n",
            "イテレーション 5280 || Loss: 3.8671 || 10iter: 25.1529 sec.\n",
            "イテレーション 5290 || Loss: 3.2209 || 10iter: 24.6762 sec.\n",
            "イテレーション 5300 || Loss: 4.7479 || 10iter: 24.7187 sec.\n",
            "イテレーション 5310 || Loss: 4.1051 || 10iter: 25.4871 sec.\n",
            "イテレーション 5320 || Loss: 3.6884 || 10iter: 25.1943 sec.\n",
            "イテレーション 5330 || Loss: 3.8280 || 10iter: 25.4853 sec.\n",
            "イテレーション 5340 || Loss: 3.9596 || 10iter: 25.6098 sec.\n",
            "イテレーション 5350 || Loss: 4.0553 || 10iter: 25.1921 sec.\n",
            "イテレーション 5360 || Loss: 3.6751 || 10iter: 25.7955 sec.\n",
            "イテレーション 5370 || Loss: 3.6652 || 10iter: 24.9524 sec.\n",
            "-------------\n",
            "（val）\n",
            "-------------\n",
            "epoch 30 || Epoch_TRAIN_Loss:690.7371 ||Epoch_VAL_Loss:738.6701\n",
            "timer:  652.4462 sec.\n",
            "-------------\n",
            "Epoch 31/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 5380 || Loss: 3.4592 || 10iter: 25.8257 sec.\n",
            "イテレーション 5390 || Loss: 3.9923 || 10iter: 25.0523 sec.\n",
            "イテレーション 5400 || Loss: 3.6469 || 10iter: 24.8500 sec.\n",
            "イテレーション 5410 || Loss: 3.4601 || 10iter: 25.5168 sec.\n",
            "イテレーション 5420 || Loss: 3.8799 || 10iter: 25.1459 sec.\n",
            "イテレーション 5430 || Loss: 3.8533 || 10iter: 25.2000 sec.\n",
            "イテレーション 5440 || Loss: 4.2126 || 10iter: 24.8532 sec.\n",
            "イテレーション 5450 || Loss: 3.5607 || 10iter: 25.2694 sec.\n",
            "イテレーション 5460 || Loss: 4.0916 || 10iter: 24.9788 sec.\n",
            "イテレーション 5470 || Loss: 4.5465 || 10iter: 24.8943 sec.\n",
            "イテレーション 5480 || Loss: 3.8082 || 10iter: 25.0364 sec.\n",
            "イテレーション 5490 || Loss: 3.6935 || 10iter: 25.0582 sec.\n",
            "イテレーション 5500 || Loss: 3.2249 || 10iter: 26.0239 sec.\n",
            "イテレーション 5510 || Loss: 3.2227 || 10iter: 24.8009 sec.\n",
            "イテレーション 5520 || Loss: 3.9288 || 10iter: 25.0360 sec.\n",
            "イテレーション 5530 || Loss: 3.6011 || 10iter: 25.1301 sec.\n",
            "イテレーション 5540 || Loss: 3.6565 || 10iter: 24.9071 sec.\n",
            "-------------\n",
            "epoch 31 || Epoch_TRAIN_Loss:680.9387 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  473.8027 sec.\n",
            "-------------\n",
            "Epoch 32/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 5550 || Loss: 3.8682 || 10iter: 1.2708 sec.\n",
            "イテレーション 5560 || Loss: 4.4063 || 10iter: 24.9229 sec.\n",
            "イテレーション 5570 || Loss: 3.6343 || 10iter: 24.9934 sec.\n",
            "イテレーション 5580 || Loss: 3.6540 || 10iter: 25.0713 sec.\n",
            "イテレーション 5590 || Loss: 4.3058 || 10iter: 25.1280 sec.\n",
            "イテレーション 5600 || Loss: 3.9205 || 10iter: 25.3050 sec.\n",
            "イテレーション 5610 || Loss: 3.3659 || 10iter: 25.0433 sec.\n",
            "イテレーション 5620 || Loss: 4.1601 || 10iter: 25.4994 sec.\n",
            "イテレーション 5630 || Loss: 3.8436 || 10iter: 24.9980 sec.\n",
            "イテレーション 5640 || Loss: 3.7864 || 10iter: 25.2725 sec.\n",
            "イテレーション 5650 || Loss: 3.9362 || 10iter: 25.5723 sec.\n",
            "イテレーション 5660 || Loss: 3.5412 || 10iter: 25.3220 sec.\n",
            "イテレーション 5670 || Loss: 3.7803 || 10iter: 24.9023 sec.\n",
            "イテレーション 5680 || Loss: 4.3720 || 10iter: 25.0578 sec.\n",
            "イテレーション 5690 || Loss: 4.3209 || 10iter: 25.2154 sec.\n",
            "イテレーション 5700 || Loss: 3.4901 || 10iter: 25.0733 sec.\n",
            "イテレーション 5710 || Loss: 4.0293 || 10iter: 25.5340 sec.\n",
            "イテレーション 5720 || Loss: 4.2791 || 10iter: 25.7418 sec.\n",
            "-------------\n",
            "epoch 32 || Epoch_TRAIN_Loss:675.5190 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  474.3583 sec.\n",
            "-------------\n",
            "Epoch 33/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 5730 || Loss: 4.0730 || 10iter: 4.0178 sec.\n",
            "イテレーション 5740 || Loss: 3.4631 || 10iter: 25.3640 sec.\n",
            "イテレーション 5750 || Loss: 4.3148 || 10iter: 24.5421 sec.\n",
            "イテレーション 5760 || Loss: 3.7084 || 10iter: 25.0441 sec.\n",
            "イテレーション 5770 || Loss: 3.6500 || 10iter: 25.7429 sec.\n",
            "イテレーション 5780 || Loss: 3.8367 || 10iter: 25.0521 sec.\n",
            "イテレーション 5790 || Loss: 3.6903 || 10iter: 25.1522 sec.\n",
            "イテレーション 5800 || Loss: 3.6789 || 10iter: 25.3293 sec.\n",
            "イテレーション 5810 || Loss: 3.8065 || 10iter: 24.9658 sec.\n",
            "イテレーション 5820 || Loss: 3.9792 || 10iter: 24.9997 sec.\n",
            "イテレーション 5830 || Loss: 3.5440 || 10iter: 24.9652 sec.\n",
            "イテレーション 5840 || Loss: 3.5014 || 10iter: 25.2051 sec.\n",
            "イテレーション 5850 || Loss: 3.9319 || 10iter: 24.9223 sec.\n",
            "イテレーション 5860 || Loss: 3.1053 || 10iter: 25.3541 sec.\n",
            "イテレーション 5870 || Loss: 4.0007 || 10iter: 25.0730 sec.\n",
            "イテレーション 5880 || Loss: 4.0852 || 10iter: 25.4427 sec.\n",
            "イテレーション 5890 || Loss: 3.9909 || 10iter: 24.9522 sec.\n",
            "イテレーション 5900 || Loss: 3.3616 || 10iter: 24.7679 sec.\n",
            "-------------\n",
            "epoch 33 || Epoch_TRAIN_Loss:672.6090 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  472.7624 sec.\n",
            "-------------\n",
            "Epoch 34/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 5910 || Loss: 3.7116 || 10iter: 6.4918 sec.\n",
            "イテレーション 5920 || Loss: 3.9586 || 10iter: 25.2038 sec.\n",
            "イテレーション 5930 || Loss: 3.9736 || 10iter: 25.1824 sec.\n",
            "イテレーション 5940 || Loss: 4.2106 || 10iter: 25.8521 sec.\n",
            "イテレーション 5950 || Loss: 4.0905 || 10iter: 24.8099 sec.\n",
            "イテレーション 5960 || Loss: 4.2583 || 10iter: 25.8729 sec.\n",
            "イテレーション 5970 || Loss: 3.4088 || 10iter: 25.1411 sec.\n",
            "イテレーション 5980 || Loss: 3.5734 || 10iter: 24.9570 sec.\n",
            "イテレーション 5990 || Loss: 3.6887 || 10iter: 25.3321 sec.\n",
            "イテレーション 6000 || Loss: 4.1500 || 10iter: 25.5103 sec.\n",
            "イテレーション 6010 || Loss: 3.6170 || 10iter: 24.8477 sec.\n",
            "イテレーション 6020 || Loss: 3.6462 || 10iter: 25.8269 sec.\n",
            "イテレーション 6030 || Loss: 3.7492 || 10iter: 26.3628 sec.\n",
            "イテレーション 6040 || Loss: 3.9227 || 10iter: 24.9058 sec.\n",
            "イテレーション 6050 || Loss: 3.6597 || 10iter: 25.0584 sec.\n",
            "イテレーション 6060 || Loss: 3.0874 || 10iter: 25.3147 sec.\n",
            "イテレーション 6070 || Loss: 3.7991 || 10iter: 25.1625 sec.\n",
            "イテレーション 6080 || Loss: 3.7570 || 10iter: 25.0121 sec.\n",
            "-------------\n",
            "epoch 34 || Epoch_TRAIN_Loss:666.8417 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  476.0287 sec.\n",
            "-------------\n",
            "Epoch 35/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 6090 || Loss: 3.9283 || 10iter: 9.1856 sec.\n",
            "イテレーション 6100 || Loss: 3.8567 || 10iter: 25.4546 sec.\n",
            "イテレーション 6110 || Loss: 3.9773 || 10iter: 24.8872 sec.\n",
            "イテレーション 6120 || Loss: 3.2401 || 10iter: 24.9292 sec.\n",
            "イテレーション 6130 || Loss: 3.0997 || 10iter: 25.2807 sec.\n",
            "イテレーション 6140 || Loss: 3.9292 || 10iter: 25.6436 sec.\n",
            "イテレーション 6150 || Loss: 4.0041 || 10iter: 25.7879 sec.\n",
            "イテレーション 6160 || Loss: 3.2833 || 10iter: 24.7686 sec.\n",
            "イテレーション 6170 || Loss: 3.6507 || 10iter: 25.3762 sec.\n",
            "イテレーション 6180 || Loss: 3.5728 || 10iter: 24.9327 sec.\n",
            "イテレーション 6190 || Loss: 3.8138 || 10iter: 25.0700 sec.\n",
            "イテレーション 6200 || Loss: 3.6948 || 10iter: 25.0662 sec.\n",
            "イテレーション 6210 || Loss: 3.3427 || 10iter: 25.0345 sec.\n",
            "イテレーション 6220 || Loss: 3.9898 || 10iter: 24.9705 sec.\n",
            "イテレーション 6230 || Loss: 3.7454 || 10iter: 25.0783 sec.\n",
            "イテレーション 6240 || Loss: 3.1421 || 10iter: 24.8937 sec.\n",
            "イテレーション 6250 || Loss: 3.8475 || 10iter: 24.9487 sec.\n",
            "イテレーション 6260 || Loss: 4.0071 || 10iter: 24.7935 sec.\n",
            "-------------\n",
            "epoch 35 || Epoch_TRAIN_Loss:658.9308 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  472.5378 sec.\n",
            "-------------\n",
            "Epoch 36/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 6270 || Loss: 3.6480 || 10iter: 11.8261 sec.\n",
            "イテレーション 6280 || Loss: 3.3837 || 10iter: 24.9441 sec.\n",
            "イテレーション 6290 || Loss: 3.8142 || 10iter: 25.1225 sec.\n",
            "イテレーション 6300 || Loss: 3.6378 || 10iter: 24.6910 sec.\n",
            "イテレーション 6310 || Loss: 3.9762 || 10iter: 25.4317 sec.\n",
            "イテレーション 6320 || Loss: 3.6677 || 10iter: 24.7171 sec.\n",
            "イテレーション 6330 || Loss: 3.1643 || 10iter: 24.9477 sec.\n",
            "イテレーション 6340 || Loss: 3.7648 || 10iter: 24.7535 sec.\n",
            "イテレーション 6350 || Loss: 3.7595 || 10iter: 25.4621 sec.\n",
            "イテレーション 6360 || Loss: 3.8975 || 10iter: 24.9433 sec.\n",
            "イテレーション 6370 || Loss: 3.1462 || 10iter: 24.8748 sec.\n",
            "イテレーション 6380 || Loss: 3.4856 || 10iter: 25.8795 sec.\n",
            "イテレーション 6390 || Loss: 3.3698 || 10iter: 24.9834 sec.\n",
            "イテレーション 6400 || Loss: 3.4830 || 10iter: 25.1177 sec.\n",
            "イテレーション 6410 || Loss: 3.8750 || 10iter: 24.6166 sec.\n",
            "イテレーション 6420 || Loss: 3.8512 || 10iter: 24.9368 sec.\n",
            "イテレーション 6430 || Loss: 3.5293 || 10iter: 25.0087 sec.\n",
            "イテレーション 6440 || Loss: 3.6883 || 10iter: 24.6681 sec.\n",
            "-------------\n",
            "epoch 36 || Epoch_TRAIN_Loss:653.4284 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  470.8333 sec.\n",
            "-------------\n",
            "Epoch 37/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 6450 || Loss: 3.7134 || 10iter: 14.1666 sec.\n",
            "イテレーション 6460 || Loss: 3.1777 || 10iter: 24.6695 sec.\n",
            "イテレーション 6470 || Loss: 3.8241 || 10iter: 24.8471 sec.\n",
            "イテレーション 6480 || Loss: 3.6672 || 10iter: 25.6580 sec.\n",
            "イテレーション 6490 || Loss: 4.2558 || 10iter: 25.3111 sec.\n",
            "イテレーション 6500 || Loss: 4.2875 || 10iter: 25.1828 sec.\n",
            "イテレーション 6510 || Loss: 3.6894 || 10iter: 25.3611 sec.\n",
            "イテレーション 6520 || Loss: 3.8660 || 10iter: 25.0236 sec.\n",
            "イテレーション 6530 || Loss: 3.2986 || 10iter: 25.5012 sec.\n",
            "イテレーション 6540 || Loss: 3.2776 || 10iter: 25.1105 sec.\n",
            "イテレーション 6550 || Loss: 3.5144 || 10iter: 25.0389 sec.\n",
            "イテレーション 6560 || Loss: 3.1729 || 10iter: 25.1644 sec.\n",
            "イテレーション 6570 || Loss: 3.7040 || 10iter: 25.0017 sec.\n",
            "イテレーション 6580 || Loss: 3.6200 || 10iter: 24.9612 sec.\n",
            "イテレーション 6590 || Loss: 3.7961 || 10iter: 25.0346 sec.\n",
            "イテレーション 6600 || Loss: 4.2016 || 10iter: 24.9752 sec.\n",
            "イテレーション 6610 || Loss: 3.5713 || 10iter: 24.9223 sec.\n",
            "イテレーション 6620 || Loss: 3.4853 || 10iter: 24.6563 sec.\n",
            "-------------\n",
            "epoch 37 || Epoch_TRAIN_Loss:645.2967 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  471.7945 sec.\n",
            "-------------\n",
            "Epoch 38/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 6630 || Loss: 3.3049 || 10iter: 17.1842 sec.\n",
            "イテレーション 6640 || Loss: 3.2199 || 10iter: 24.7869 sec.\n",
            "イテレーション 6650 || Loss: 2.8113 || 10iter: 24.7178 sec.\n",
            "イテレーション 6660 || Loss: 3.1346 || 10iter: 24.8882 sec.\n",
            "イテレーション 6670 || Loss: 3.3885 || 10iter: 25.0750 sec.\n",
            "イテレーション 6680 || Loss: 3.8249 || 10iter: 24.7061 sec.\n",
            "イテレーション 6690 || Loss: 3.9908 || 10iter: 25.0826 sec.\n",
            "イテレーション 6700 || Loss: 3.8533 || 10iter: 24.8909 sec.\n",
            "イテレーション 6710 || Loss: 3.9685 || 10iter: 24.5458 sec.\n",
            "イテレーション 6720 || Loss: 3.5110 || 10iter: 24.6608 sec.\n",
            "イテレーション 6730 || Loss: 3.7731 || 10iter: 24.4958 sec.\n",
            "イテレーション 6740 || Loss: 3.5118 || 10iter: 26.0689 sec.\n",
            "イテレーション 6750 || Loss: 3.4029 || 10iter: 24.8483 sec.\n",
            "イテレーション 6760 || Loss: 3.7999 || 10iter: 24.8993 sec.\n",
            "イテレーション 6770 || Loss: 3.3165 || 10iter: 24.7059 sec.\n",
            "イテレーション 6780 || Loss: 3.4878 || 10iter: 25.8397 sec.\n",
            "イテレーション 6790 || Loss: 3.8093 || 10iter: 26.1786 sec.\n",
            "イテレーション 6800 || Loss: 3.3748 || 10iter: 24.6150 sec.\n",
            "-------------\n",
            "epoch 38 || Epoch_TRAIN_Loss:649.4865 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  470.8682 sec.\n",
            "-------------\n",
            "Epoch 39/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 6810 || Loss: 3.9929 || 10iter: 19.9816 sec.\n",
            "イテレーション 6820 || Loss: 3.3692 || 10iter: 24.6379 sec.\n",
            "イテレーション 6830 || Loss: 3.5514 || 10iter: 24.7283 sec.\n",
            "イテレーション 6840 || Loss: 3.5344 || 10iter: 26.3233 sec.\n",
            "イテレーション 6850 || Loss: 3.8119 || 10iter: 24.8389 sec.\n",
            "イテレーション 6860 || Loss: 3.5755 || 10iter: 24.8925 sec.\n",
            "イテレーション 6870 || Loss: 3.4273 || 10iter: 24.8634 sec.\n",
            "イテレーション 6880 || Loss: 3.7625 || 10iter: 25.0917 sec.\n",
            "イテレーション 6890 || Loss: 3.6623 || 10iter: 25.6558 sec.\n",
            "イテレーション 6900 || Loss: 3.5337 || 10iter: 25.0102 sec.\n",
            "イテレーション 6910 || Loss: 3.1731 || 10iter: 24.7336 sec.\n",
            "イテレーション 6920 || Loss: 3.3390 || 10iter: 25.0253 sec.\n",
            "イテレーション 6930 || Loss: 3.0993 || 10iter: 24.9050 sec.\n",
            "イテレーション 6940 || Loss: 3.7234 || 10iter: 25.2647 sec.\n",
            "イテレーション 6950 || Loss: 4.1350 || 10iter: 25.5295 sec.\n",
            "イテレーション 6960 || Loss: 3.3512 || 10iter: 25.0493 sec.\n",
            "イテレーション 6970 || Loss: 3.7950 || 10iter: 25.6671 sec.\n",
            "イテレーション 6980 || Loss: 3.4210 || 10iter: 24.6462 sec.\n",
            "-------------\n",
            "epoch 39 || Epoch_TRAIN_Loss:638.2987 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  472.8193 sec.\n",
            "-------------\n",
            "Epoch 40/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 6990 || Loss: 3.3776 || 10iter: 22.1188 sec.\n",
            "イテレーション 7000 || Loss: 3.8366 || 10iter: 25.0321 sec.\n",
            "イテレーション 7010 || Loss: 3.3013 || 10iter: 24.6798 sec.\n",
            "イテレーション 7020 || Loss: 3.7741 || 10iter: 24.8431 sec.\n",
            "イテレーション 7030 || Loss: 3.4615 || 10iter: 24.7077 sec.\n",
            "イテレーション 7040 || Loss: 3.3503 || 10iter: 24.7721 sec.\n",
            "イテレーション 7050 || Loss: 3.5863 || 10iter: 25.1377 sec.\n",
            "イテレーション 7060 || Loss: 2.7635 || 10iter: 24.8389 sec.\n",
            "イテレーション 7070 || Loss: 3.8906 || 10iter: 24.9367 sec.\n",
            "イテレーション 7080 || Loss: 3.6460 || 10iter: 24.9650 sec.\n",
            "イテレーション 7090 || Loss: 3.3331 || 10iter: 25.0660 sec.\n",
            "イテレーション 7100 || Loss: 3.9313 || 10iter: 24.9846 sec.\n",
            "イテレーション 7110 || Loss: 3.4328 || 10iter: 25.0975 sec.\n",
            "イテレーション 7120 || Loss: 3.3891 || 10iter: 25.0008 sec.\n",
            "イテレーション 7130 || Loss: 3.2632 || 10iter: 25.1123 sec.\n",
            "イテレーション 7140 || Loss: 3.7925 || 10iter: 25.0537 sec.\n",
            "イテレーション 7150 || Loss: 4.0918 || 10iter: 25.2236 sec.\n",
            "イテレーション 7160 || Loss: 3.7018 || 10iter: 25.0916 sec.\n",
            "-------------\n",
            "（val）\n",
            "-------------\n",
            "epoch 40 || Epoch_TRAIN_Loss:635.1501 ||Epoch_VAL_Loss:717.6542\n",
            "timer:  647.0418 sec.\n",
            "-------------\n",
            "Epoch 41/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 7170 || Loss: 3.4505 || 10iter: 25.6394 sec.\n",
            "イテレーション 7180 || Loss: 3.5946 || 10iter: 25.1261 sec.\n",
            "イテレーション 7190 || Loss: 3.9739 || 10iter: 24.4467 sec.\n",
            "イテレーション 7200 || Loss: 3.4168 || 10iter: 24.5617 sec.\n",
            "イテレーション 7210 || Loss: 3.8291 || 10iter: 24.7768 sec.\n",
            "イテレーション 7220 || Loss: 3.1705 || 10iter: 25.4038 sec.\n",
            "イテレーション 7230 || Loss: 3.3762 || 10iter: 24.9196 sec.\n",
            "イテレーション 7240 || Loss: 3.8982 || 10iter: 24.9474 sec.\n",
            "イテレーション 7250 || Loss: 3.3007 || 10iter: 24.4461 sec.\n",
            "イテレーション 7260 || Loss: 4.1295 || 10iter: 24.8481 sec.\n",
            "イテレーション 7270 || Loss: 3.7580 || 10iter: 25.1015 sec.\n",
            "イテレーション 7280 || Loss: 3.6146 || 10iter: 24.6737 sec.\n",
            "イテレーション 7290 || Loss: 3.0193 || 10iter: 24.8681 sec.\n",
            "イテレーション 7300 || Loss: 3.6845 || 10iter: 24.8789 sec.\n",
            "イテレーション 7310 || Loss: 3.2842 || 10iter: 25.1165 sec.\n",
            "イテレーション 7320 || Loss: 3.5883 || 10iter: 24.7369 sec.\n",
            "イテレーション 7330 || Loss: 3.3884 || 10iter: 25.2361 sec.\n",
            "-------------\n",
            "epoch 41 || Epoch_TRAIN_Loss:639.1552 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  469.5087 sec.\n",
            "-------------\n",
            "Epoch 42/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 7340 || Loss: 3.4059 || 10iter: 1.2158 sec.\n",
            "イテレーション 7350 || Loss: 3.6089 || 10iter: 24.9731 sec.\n",
            "イテレーション 7360 || Loss: 2.9912 || 10iter: 24.7554 sec.\n",
            "イテレーション 7370 || Loss: 3.4965 || 10iter: 24.9247 sec.\n",
            "イテレーション 7380 || Loss: 3.4180 || 10iter: 25.7666 sec.\n",
            "イテレーション 7390 || Loss: 3.4844 || 10iter: 24.4995 sec.\n",
            "イテレーション 7400 || Loss: 3.8415 || 10iter: 25.1873 sec.\n",
            "イテレーション 7410 || Loss: 3.7824 || 10iter: 26.3477 sec.\n",
            "イテレーション 7420 || Loss: 3.2624 || 10iter: 25.4443 sec.\n",
            "イテレーション 7430 || Loss: 3.2771 || 10iter: 25.3704 sec.\n",
            "イテレーション 7440 || Loss: 3.2498 || 10iter: 24.9274 sec.\n",
            "イテレーション 7450 || Loss: 3.5349 || 10iter: 25.0781 sec.\n",
            "イテレーション 7460 || Loss: 2.8396 || 10iter: 25.0037 sec.\n",
            "イテレーション 7470 || Loss: 3.8476 || 10iter: 24.6752 sec.\n",
            "イテレーション 7480 || Loss: 3.0473 || 10iter: 24.9238 sec.\n",
            "イテレーション 7490 || Loss: 3.3261 || 10iter: 24.7707 sec.\n",
            "イテレーション 7500 || Loss: 4.0780 || 10iter: 24.9828 sec.\n",
            "イテレーション 7510 || Loss: 3.7673 || 10iter: 24.6535 sec.\n",
            "-------------\n",
            "epoch 42 || Epoch_TRAIN_Loss:625.8802 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  471.3070 sec.\n",
            "-------------\n",
            "Epoch 43/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 7520 || Loss: 3.3421 || 10iter: 3.7339 sec.\n",
            "イテレーション 7530 || Loss: 3.1646 || 10iter: 25.3667 sec.\n",
            "イテレーション 7540 || Loss: 3.4762 || 10iter: 25.3017 sec.\n",
            "イテレーション 7550 || Loss: 3.6781 || 10iter: 24.9940 sec.\n",
            "イテレーション 7560 || Loss: 3.3492 || 10iter: 24.8995 sec.\n",
            "イテレーション 7570 || Loss: 3.6754 || 10iter: 24.8171 sec.\n",
            "イテレーション 7580 || Loss: 3.9153 || 10iter: 25.1292 sec.\n",
            "イテレーション 7590 || Loss: 3.1490 || 10iter: 24.9269 sec.\n",
            "イテレーション 7600 || Loss: 3.5668 || 10iter: 24.8002 sec.\n",
            "イテレーション 7610 || Loss: 3.8053 || 10iter: 24.7589 sec.\n",
            "イテレーション 7620 || Loss: 3.3549 || 10iter: 24.9644 sec.\n",
            "イテレーション 7630 || Loss: 3.2259 || 10iter: 25.1994 sec.\n",
            "イテレーション 7640 || Loss: 3.7445 || 10iter: 25.6081 sec.\n",
            "イテレーション 7650 || Loss: 4.1714 || 10iter: 25.4348 sec.\n",
            "イテレーション 7660 || Loss: 3.2401 || 10iter: 25.1434 sec.\n",
            "イテレーション 7670 || Loss: 3.8870 || 10iter: 24.9496 sec.\n",
            "イテレーション 7680 || Loss: 3.4232 || 10iter: 25.2903 sec.\n",
            "イテレーション 7690 || Loss: 3.2314 || 10iter: 24.5951 sec.\n",
            "-------------\n",
            "epoch 43 || Epoch_TRAIN_Loss:629.7055 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  471.3626 sec.\n",
            "-------------\n",
            "Epoch 44/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 7700 || Loss: 3.4669 || 10iter: 6.5803 sec.\n",
            "イテレーション 7710 || Loss: 3.4386 || 10iter: 24.6859 sec.\n",
            "イテレーション 7720 || Loss: 3.4450 || 10iter: 25.9396 sec.\n",
            "イテレーション 7730 || Loss: 3.8811 || 10iter: 24.9707 sec.\n",
            "イテレーション 7740 || Loss: 3.3268 || 10iter: 25.0944 sec.\n",
            "イテレーション 7750 || Loss: 3.3443 || 10iter: 24.9685 sec.\n",
            "イテレーション 7760 || Loss: 3.3520 || 10iter: 25.8101 sec.\n",
            "イテレーション 7770 || Loss: 3.8058 || 10iter: 26.0702 sec.\n",
            "イテレーション 7780 || Loss: 3.6069 || 10iter: 25.0012 sec.\n",
            "イテレーション 7790 || Loss: 3.9025 || 10iter: 24.9261 sec.\n",
            "イテレーション 7800 || Loss: 3.4641 || 10iter: 24.7790 sec.\n",
            "イテレーション 7810 || Loss: 3.1095 || 10iter: 25.6669 sec.\n",
            "イテレーション 7820 || Loss: 3.8580 || 10iter: 25.0580 sec.\n",
            "イテレーション 7830 || Loss: 3.6176 || 10iter: 24.9174 sec.\n",
            "イテレーション 7840 || Loss: 3.2808 || 10iter: 25.4866 sec.\n",
            "イテレーション 7850 || Loss: 3.1334 || 10iter: 25.1359 sec.\n",
            "イテレーション 7860 || Loss: 3.0741 || 10iter: 25.5694 sec.\n",
            "イテレーション 7870 || Loss: 3.3115 || 10iter: 25.4548 sec.\n",
            "-------------\n",
            "epoch 44 || Epoch_TRAIN_Loss:623.1665 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  475.2565 sec.\n",
            "-------------\n",
            "Epoch 45/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 7880 || Loss: 2.9726 || 10iter: 9.1036 sec.\n",
            "イテレーション 7890 || Loss: 3.5269 || 10iter: 24.9088 sec.\n",
            "イテレーション 7900 || Loss: 3.5205 || 10iter: 25.1441 sec.\n",
            "イテレーション 7910 || Loss: 3.3593 || 10iter: 24.7822 sec.\n",
            "イテレーション 7920 || Loss: 3.8282 || 10iter: 24.7011 sec.\n",
            "イテレーション 7930 || Loss: 3.7673 || 10iter: 24.9561 sec.\n",
            "イテレーション 7940 || Loss: 3.3101 || 10iter: 24.8834 sec.\n",
            "イテレーション 7950 || Loss: 3.5312 || 10iter: 25.3751 sec.\n",
            "イテレーション 7960 || Loss: 3.0795 || 10iter: 25.0454 sec.\n",
            "イテレーション 7970 || Loss: 3.8866 || 10iter: 25.1169 sec.\n",
            "イテレーション 7980 || Loss: 3.4874 || 10iter: 24.8055 sec.\n",
            "イテレーション 7990 || Loss: 3.0505 || 10iter: 25.2013 sec.\n",
            "イテレーション 8000 || Loss: 3.4371 || 10iter: 24.6443 sec.\n",
            "イテレーション 8010 || Loss: 3.5065 || 10iter: 25.0011 sec.\n",
            "イテレーション 8020 || Loss: 3.7098 || 10iter: 25.2971 sec.\n",
            "イテレーション 8030 || Loss: 3.5624 || 10iter: 25.6033 sec.\n",
            "イテレーション 8040 || Loss: 3.3968 || 10iter: 25.4670 sec.\n",
            "イテレーション 8050 || Loss: 3.3529 || 10iter: 24.8043 sec.\n",
            "-------------\n",
            "epoch 45 || Epoch_TRAIN_Loss:619.5547 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  471.0480 sec.\n",
            "-------------\n",
            "Epoch 46/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 8060 || Loss: 3.3035 || 10iter: 12.0257 sec.\n",
            "イテレーション 8070 || Loss: 3.3577 || 10iter: 24.6995 sec.\n",
            "イテレーション 8080 || Loss: 3.0787 || 10iter: 24.6177 sec.\n",
            "イテレーション 8090 || Loss: 3.3166 || 10iter: 24.7418 sec.\n",
            "イテレーション 8100 || Loss: 3.4696 || 10iter: 25.9579 sec.\n",
            "イテレーション 8110 || Loss: 3.8400 || 10iter: 25.2904 sec.\n",
            "イテレーション 8120 || Loss: 3.3891 || 10iter: 24.9723 sec.\n",
            "イテレーション 8130 || Loss: 2.6626 || 10iter: 25.0378 sec.\n",
            "イテレーション 8140 || Loss: 3.6087 || 10iter: 25.0422 sec.\n",
            "イテレーション 8150 || Loss: 3.5487 || 10iter: 25.3511 sec.\n",
            "イテレーション 8160 || Loss: 3.5320 || 10iter: 25.1013 sec.\n",
            "イテレーション 8170 || Loss: 3.7996 || 10iter: 24.8418 sec.\n",
            "イテレーション 8180 || Loss: 3.4745 || 10iter: 25.1592 sec.\n",
            "イテレーション 8190 || Loss: 3.3207 || 10iter: 25.7433 sec.\n",
            "イテレーション 8200 || Loss: 3.2166 || 10iter: 25.5921 sec.\n",
            "イテレーション 8210 || Loss: 3.3695 || 10iter: 24.8186 sec.\n",
            "イテレーション 8220 || Loss: 3.2314 || 10iter: 25.1248 sec.\n",
            "イテレーション 8230 || Loss: 2.8491 || 10iter: 24.7395 sec.\n",
            "-------------\n",
            "epoch 46 || Epoch_TRAIN_Loss:612.2378 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  472.4785 sec.\n",
            "-------------\n",
            "Epoch 47/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 8240 || Loss: 3.1792 || 10iter: 14.2956 sec.\n",
            "イテレーション 8250 || Loss: 2.8342 || 10iter: 25.1068 sec.\n",
            "イテレーション 8260 || Loss: 3.7851 || 10iter: 25.3771 sec.\n",
            "イテレーション 8270 || Loss: 3.4079 || 10iter: 24.9131 sec.\n",
            "イテレーション 8280 || Loss: 3.2310 || 10iter: 24.9433 sec.\n",
            "イテレーション 8290 || Loss: 3.6028 || 10iter: 24.9592 sec.\n",
            "イテレーション 8300 || Loss: 2.9086 || 10iter: 24.6625 sec.\n",
            "イテレーション 8310 || Loss: 2.9382 || 10iter: 25.1078 sec.\n",
            "イテレーション 8320 || Loss: 3.1076 || 10iter: 25.4108 sec.\n",
            "イテレーション 8330 || Loss: 3.5828 || 10iter: 25.0291 sec.\n",
            "イテレーション 8340 || Loss: 4.0198 || 10iter: 25.7567 sec.\n",
            "イテレーション 8350 || Loss: 3.6882 || 10iter: 25.1661 sec.\n",
            "イテレーション 8360 || Loss: 4.0197 || 10iter: 24.7384 sec.\n",
            "イテレーション 8370 || Loss: 3.7528 || 10iter: 24.9769 sec.\n",
            "イテレーション 8380 || Loss: 3.3124 || 10iter: 25.1442 sec.\n",
            "イテレーション 8390 || Loss: 3.0969 || 10iter: 24.8723 sec.\n",
            "イテレーション 8400 || Loss: 3.1479 || 10iter: 24.8674 sec.\n",
            "イテレーション 8410 || Loss: 3.3350 || 10iter: 25.2606 sec.\n",
            "-------------\n",
            "epoch 47 || Epoch_TRAIN_Loss:608.4446 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  471.5926 sec.\n",
            "-------------\n",
            "Epoch 48/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 8420 || Loss: 3.8047 || 10iter: 16.7267 sec.\n",
            "イテレーション 8430 || Loss: 3.5549 || 10iter: 24.8854 sec.\n",
            "イテレーション 8440 || Loss: 3.9050 || 10iter: 25.4822 sec.\n",
            "イテレーション 8450 || Loss: 3.3741 || 10iter: 24.8232 sec.\n",
            "イテレーション 8460 || Loss: 3.4103 || 10iter: 25.4457 sec.\n",
            "イテレーション 8470 || Loss: 3.2617 || 10iter: 24.7272 sec.\n",
            "イテレーション 8480 || Loss: 3.5395 || 10iter: 25.1082 sec.\n",
            "イテレーション 8490 || Loss: 3.1808 || 10iter: 25.1604 sec.\n",
            "イテレーション 8500 || Loss: 3.1340 || 10iter: 24.9530 sec.\n",
            "イテレーション 8510 || Loss: 3.2258 || 10iter: 25.5871 sec.\n",
            "イテレーション 8520 || Loss: 3.0001 || 10iter: 24.9270 sec.\n",
            "イテレーション 8530 || Loss: 4.1057 || 10iter: 24.8381 sec.\n",
            "イテレーション 8540 || Loss: 4.0666 || 10iter: 25.9956 sec.\n",
            "イテレーション 8550 || Loss: 3.3510 || 10iter: 24.9772 sec.\n",
            "イテレーション 8560 || Loss: 3.7751 || 10iter: 25.0860 sec.\n",
            "イテレーション 8570 || Loss: 3.6896 || 10iter: 24.7608 sec.\n",
            "イテレーション 8580 || Loss: 3.0541 || 10iter: 26.3094 sec.\n",
            "イテレーション 8590 || Loss: 4.0662 || 10iter: 25.5152 sec.\n",
            "-------------\n",
            "epoch 48 || Epoch_TRAIN_Loss:611.4710 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  473.6986 sec.\n",
            "-------------\n",
            "Epoch 49/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 8600 || Loss: 2.8069 || 10iter: 19.5672 sec.\n",
            "イテレーション 8610 || Loss: 3.7829 || 10iter: 24.9068 sec.\n",
            "イテレーション 8620 || Loss: 2.9649 || 10iter: 26.6416 sec.\n",
            "イテレーション 8630 || Loss: 3.3820 || 10iter: 25.6378 sec.\n",
            "イテレーション 8640 || Loss: 3.6769 || 10iter: 24.9919 sec.\n",
            "イテレーション 8650 || Loss: 3.1140 || 10iter: 24.8167 sec.\n",
            "イテレーション 8660 || Loss: 3.4651 || 10iter: 25.3044 sec.\n",
            "イテレーション 8670 || Loss: 3.4845 || 10iter: 24.6174 sec.\n",
            "イテレーション 8680 || Loss: 3.3513 || 10iter: 24.5320 sec.\n",
            "イテレーション 8690 || Loss: 3.2299 || 10iter: 24.6840 sec.\n",
            "イテレーション 8700 || Loss: 3.1614 || 10iter: 25.0758 sec.\n",
            "イテレーション 8710 || Loss: 3.5282 || 10iter: 25.2193 sec.\n",
            "イテレーション 8720 || Loss: 3.5163 || 10iter: 25.0151 sec.\n",
            "イテレーション 8730 || Loss: 3.1984 || 10iter: 25.2238 sec.\n",
            "イテレーション 8740 || Loss: 3.6586 || 10iter: 24.7336 sec.\n",
            "イテレーション 8750 || Loss: 3.8024 || 10iter: 25.0552 sec.\n",
            "イテレーション 8760 || Loss: 3.3293 || 10iter: 24.7781 sec.\n",
            "イテレーション 8770 || Loss: 3.0562 || 10iter: 25.2422 sec.\n",
            "-------------\n",
            "epoch 49 || Epoch_TRAIN_Loss:604.8719 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  471.8990 sec.\n",
            "-------------\n",
            "Epoch 50/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 8780 || Loss: 3.4463 || 10iter: 22.8072 sec.\n",
            "イテレーション 8790 || Loss: 3.0123 || 10iter: 25.5944 sec.\n",
            "イテレーション 8800 || Loss: 3.4440 || 10iter: 24.8824 sec.\n",
            "イテレーション 8810 || Loss: 3.3160 || 10iter: 25.0373 sec.\n",
            "イテレーション 8820 || Loss: 3.6765 || 10iter: 24.6528 sec.\n",
            "イテレーション 8830 || Loss: 3.7532 || 10iter: 24.8329 sec.\n",
            "イテレーション 8840 || Loss: 3.1963 || 10iter: 24.8721 sec.\n",
            "イテレーション 8850 || Loss: 3.0213 || 10iter: 25.0422 sec.\n",
            "イテレーション 8860 || Loss: 3.1868 || 10iter: 25.2127 sec.\n",
            "イテレーション 8870 || Loss: 3.5311 || 10iter: 24.7850 sec.\n",
            "イテレーション 8880 || Loss: 3.3305 || 10iter: 24.9068 sec.\n",
            "イテレーション 8890 || Loss: 3.1778 || 10iter: 25.0471 sec.\n",
            "イテレーション 8900 || Loss: 3.1180 || 10iter: 24.8149 sec.\n",
            "イテレーション 8910 || Loss: 3.5533 || 10iter: 24.5654 sec.\n",
            "イテレーション 8920 || Loss: 3.7286 || 10iter: 24.8678 sec.\n",
            "イテレーション 8930 || Loss: 3.3626 || 10iter: 24.7256 sec.\n",
            "イテレーション 8940 || Loss: 3.5941 || 10iter: 24.9277 sec.\n",
            "イテレーション 8950 || Loss: 3.4657 || 10iter: 24.5674 sec.\n",
            "-------------\n",
            "（val）\n",
            "-------------\n",
            "epoch 50 || Epoch_TRAIN_Loss:595.5822 ||Epoch_VAL_Loss:677.5523\n",
            "timer:  645.3640 sec.\n",
            "-------------\n",
            "Epoch 51/50\n",
            "-------------\n",
            "（train）\n",
            "イテレーション 8960 || Loss: 3.4011 || 10iter: 24.9716 sec.\n",
            "イテレーション 8970 || Loss: 3.1714 || 10iter: 24.6114 sec.\n",
            "イテレーション 8980 || Loss: 2.7652 || 10iter: 25.0711 sec.\n",
            "イテレーション 8990 || Loss: 3.1591 || 10iter: 25.3803 sec.\n",
            "イテレーション 9000 || Loss: 3.3966 || 10iter: 25.7021 sec.\n",
            "イテレーション 9010 || Loss: 3.6379 || 10iter: 24.8387 sec.\n",
            "イテレーション 9020 || Loss: 3.1210 || 10iter: 25.5604 sec.\n",
            "イテレーション 9030 || Loss: 3.1814 || 10iter: 24.6435 sec.\n",
            "イテレーション 9040 || Loss: 3.3453 || 10iter: 24.8483 sec.\n",
            "イテレーション 9050 || Loss: 3.3619 || 10iter: 24.8166 sec.\n",
            "イテレーション 9060 || Loss: 3.5854 || 10iter: 25.0872 sec.\n",
            "イテレーション 9070 || Loss: 3.1939 || 10iter: 24.9121 sec.\n",
            "イテレーション 9080 || Loss: 3.5498 || 10iter: 24.9483 sec.\n",
            "イテレーション 9090 || Loss: 3.6949 || 10iter: 25.0481 sec.\n",
            "イテレーション 9100 || Loss: 2.9756 || 10iter: 25.2884 sec.\n",
            "イテレーション 9110 || Loss: 3.2811 || 10iter: 24.9732 sec.\n",
            "イテレーション 9120 || Loss: 3.2878 || 10iter: 24.7248 sec.\n",
            "-------------\n",
            "epoch 51 || Epoch_TRAIN_Loss:600.2198 ||Epoch_VAL_Loss:0.0000\n",
            "timer:  471.2045 sec.\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "KAXU63BxJvlP"
      },
      "source": [
        "以上"
      ]
    }
  ]
}